On Wed, Jan 10, 2007 at 02:53:01PM +1100, Gavin Sherry wrote:
> Can we be sure that a BCC build libpq is even safe to use given the
> problems seen when using psql?
I have high confidence in my BCC-built libpq, in so far as its functions
are exposed through the Tcl interface pgtcl-ng. My test suite for pgtcl
is rather thorough (more below), and it passes using BCC-built libpq.
Compare that to the fact that my BCC-built psql crashes consistently after
six "\h set" commands - which don't even use libpq! - and you can see why I
think the problem is entirely in psql.
BCC was free to use and easy to set up, and I was able to make Tcl-loadable
modules with it, so that's what I'm using for pgtcl-ng. I'm not suggesting
people use it for anything else based on what I've done. If there is a
regression test for libpq which does not use psql, show me and I'll run it.
Otherwise, people will have to do their own testing. But in my opinion if
you have Mingw or VC++, use it (not that I've used either).
My test suite exercises libpq/pgtcl. I use it for pgtclng and pgintcl (see
pgfoundry). It runs about 160 test cases on Windows (more on Linux, where
it tests for memory leaks, but I don't know how to do that on Windows). It
includes: synchronous and asynchronous queries, extended 8-bit characters,
COPY From/To, cursors with text and binary data, error detection, prepared
and parameterized queries (text and binary data), large objects, long TEXT
fields, 300-column table queries, transactions, and more. I have some
performance tests in there as a sanity check, including my favorite: a
single query against a 1-column 10-row table which takes 3-10 minutes of
Three tests claim to fail on Windows, same as always. Changes to
environment variables like PGUSER within the script are not seen by
pg_connect; this is apparently a DLL thing. The other 2 failures are
false, and have to do with a limitation of tcltest not seeing output
notification messages written by libpq. These are not real errors.
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings