libpq work

Started by Chris Bitmeadalmost 26 years ago4 messageshackers
Jump to latest
#1Chris Bitmead
chrisb@nimrod.itg.telstra.com.au

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?

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Chris Bitmead (#1)
Re: libpq work

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

#3Peter Eisentraut
peter_e@gmx.net
In reply to: Tom Lane (#2)
Re: libpq work

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

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Peter Eisentraut (#3)
Re: libpq work

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