Thread: libpq work

libpq work

From
Chris Bitmead
Date:
Well after hacking around on libpq for a few days I'm starting to
understand some of the subtley of what's going on. I'm also
understanding that it's complex enough that I'm not going to be sure
anymore about what subtleties I might break. It's a pity there isn't
regression tests for this so I know for sure what is expected to happen,
and what subtle features are in there.

Anyway for this reason, I think I'm going to go back and simply add the
features I want to libpq. I've learnt enough that I think I know now how
to do it, with a minimum of patches.

Longer term, I'd like to implement SQL3 on top of libpq, then get some
comprehensive test harnesses in place, and then slowly dissolve libpq.
But without those regression tests, it's a bit scary. I assume that the
psql tests wouldn't fully exercise libpq what with the asynchonous stuff
etc?


Re: libpq work

From
Tom Lane
Date:
Chris Bitmead <chrisb@nimrod.itg.telstra.com.au> writes:
> But without those regression tests, it's a bit scary. I assume that the
> psql tests wouldn't fully exercise libpq what with the asynchonous stuff
> etc?

The regression tests don't come anywhere *near* full coverage of psql,
let alone libpq (which has many features psql never heard of).

I learned this the hard way awhile ago :-(.  It's difficult to see how
to do regression testing of async behavior though, at least with the
simplistic test methods we have now.
        regards, tom lane


Re: libpq work

From
Peter Eisentraut
Date:
Tom Lane writes:

> The regression tests don't come anywhere *near* full coverage of psql,

I have a psql test suite, in case someone needs it.

> let alone libpq (which has many features psql never heard of).

It doesn't use the fast-track thing or the non-blocking interface, but
other than that it seems that it at least calls most functions.


-- 
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden



Re: libpq work

From
Tom Lane
Date:
Peter Eisentraut <peter_e@gmx.net> writes:
> Tom Lane writes:
>> The regression tests don't come anywhere *near* full coverage of psql,

> I have a psql test suite, in case someone needs it.

Cool.  You should commit it as a new subdirectory of src/test.
        regards, tom lane