Re: [PATCHES] Building libpq/psql with Borland BCC5

From: L Bayuk <lbayuk(at)pobox(dot)com>
To: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: [PATCHES] Building libpq/psql with Borland BCC5
Date: 2007-01-11 03:06:08
Message-ID: 20070111030608.GA602@mail.mindspring.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

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
backend time.

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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Browne 2007-01-11 03:25:44 Re: Autovacuum Improvements
Previous Message Bruce Momjian 2007-01-11 03:01:13 Re: [HACKERS] [PATCHES] Allow the identifier length to be

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2007-01-11 04:19:12 Re: [PATCHES] COPY with no WAL, v2
Previous Message Bruce Momjian 2007-01-11 03:01:13 Re: [HACKERS] [PATCHES] Allow the identifier length to be