Re: tap tests driving the database via psql

2019-07-30 Thread Craig Ringer
On Wed, 31 Jul 2019 at 10:20, Andres Freund wrote: > Hi, > > On 2019-07-31 09:32:10 +0800, Craig Ringer wrote: > > OK. So rather than building our own $everything from scratch, lets look > at > > solving that. > > IDK, a minimal driver that just does what we need it to do is a few > hundred lines

Re: tap tests driving the database via psql

2019-07-30 Thread Michael Paquier
On Tue, Jul 30, 2019 at 07:20:53PM -0700, Andres Freund wrote: > IDK, a minimal driver that just does what we need it to do is a few > hundred lines, not more. And there's plenty of stuff that we simply > won't be able to test with any driver that's not purposefully written > for testing. There's e

Re: tap tests driving the database via psql

2019-07-30 Thread Andres Freund
Hi, On 2019-07-31 09:32:10 +0800, Craig Ringer wrote: > OK. So rather than building our own $everything from scratch, lets look at > solving that. IDK, a minimal driver that just does what we need it to do is a few hundred lines, not more. And there's plenty of stuff that we simply won't be able

Re: tap tests driving the database via psql

2019-07-30 Thread Craig Ringer
On Tue, 30 Jul 2019 at 21:40, Tom Lane wrote: > Craig Ringer writes: > > On Sun, 28 Jul 2019 at 03:15, Andres Freund wrote: > >> 1) Just depend on DBD::Pg being installed. It's fairly common, after > >> all. It'd be somewhat annoying that we'd often end up using a > >> different version of libp

Re: tap tests driving the database via psql

2019-07-30 Thread Alvaro Herrera
On 2019-Jul-30, Tom Lane wrote: > OK, so just lifting DBD::Pg in toto is out for license reasons. > However, maybe we could consider writing a new DBD driver from > scratch (while using a platform-provided DBI layer) rather than > doing everything from scratch. I'm not sure how much actual > func

Re: tap tests driving the database via psql

2019-07-30 Thread Tom Lane
Andres Freund writes: > On 2019-07-30 09:40:54 -0400, Tom Lane wrote: >> Now, none of these things are really a problem with DBD/DBI as such >> --- rather, they are reasons not to depend on a pre-packaged build >> of DBD::Pg that depends on a pre-packaged build of libpq.so. >> I haven't looked at

Re: tap tests driving the database via psql

2019-07-30 Thread Andres Freund
Hi, On 2019-07-30 09:40:54 -0400, Tom Lane wrote: > Craig Ringer writes: > > On Sun, 28 Jul 2019 at 03:15, Andres Freund wrote: > >> 1) Just depend on DBD::Pg being installed. It's fairly common, after > >> all. It'd be somewhat annoying that we'd often end up using a > >> different version of l

Re: tap tests driving the database via psql

2019-07-30 Thread Tom Lane
Craig Ringer writes: > On Sun, 28 Jul 2019 at 03:15, Andres Freund wrote: >> 1) Just depend on DBD::Pg being installed. It's fairly common, after >> all. It'd be somewhat annoying that we'd often end up using a >> different version of libpq than what we're testing against. But in >> most cases th

Re: tap tests driving the database via psql

2019-07-29 Thread Craig Ringer
On Sun, 28 Jul 2019 at 03:15, Andres Freund wrote: > 1) Just depend on DBD::Pg being installed. It's fairly common, after >all. It'd be somewhat annoying that we'd often end up using a >different version of libpq than what we're testing against. But in >most cases that'd not be partic

Re: tap tests driving the database via psql

2019-07-27 Thread Andres Freund
Hi, On 2019-07-27 18:57:58 -0400, Andrew Dunstan wrote: > Maybe I don't write much python but I can read it without too much > difficulty :-) > > > But you did say your skeleton was pure perl ... slip of the fingers? Ooops, yea. > > /me once more regrets that perl, not python, has been chosen

Re: tap tests driving the database via psql

2019-07-27 Thread Andrew Dunstan
On 7/27/19 6:37 PM, Andres Freund wrote: > Hi, > > On 2019-07-27 17:48:39 -0400, Andrew Dunstan wrote: >> On 7/27/19 3:15 PM, Andres Freund wrote: >>> I'm not volunteering to do 4), my perl skills aren't great (if the test >>> infra were python, otoh... I have the skeleton of a pure perl driver >

Re: tap tests driving the database via psql

2019-07-27 Thread Andres Freund
Hi, On 2019-07-27 17:48:39 -0400, Andrew Dunstan wrote: > On 7/27/19 3:15 PM, Andres Freund wrote: > > I'm not volunteering to do 4), my perl skills aren't great (if the test > > infra were python, otoh... I have the skeleton of a pure perl driver > > that I used for testing somewhere). But I am l

Re: tap tests driving the database via psql

2019-07-27 Thread Andrew Dunstan
On 7/27/19 3:15 PM, Andres Freund wrote: > Hi, > > The discussion in [1] > again reminded me how much I dislike that we currently issue database > queries in tap tests by forking psql and writing/reading from it's > stdin/stdout. > > That's quite cumbersome to write, and adds a good number of add

Re: tap tests driving the database via psql

2019-07-27 Thread Andres Freund
Hi, On 2019-07-27 22:32:37 +0200, David Fetter wrote: > On Sat, Jul 27, 2019 at 12:15:23PM -0700, Andres Freund wrote: > > 4) We develop a fairly minimal pure perl database driver, that doesn't > >depend on DBI. Include it somewhere as part of the test code, instead > >of src/interfaces, s

Re: tap tests driving the database via psql

2019-07-27 Thread David Fetter
On Sat, Jul 27, 2019 at 12:15:23PM -0700, Andres Freund wrote: > Hi, > > The discussion in [1] > again reminded me how much I dislike that we currently issue database > queries in tap tests by forking psql and writing/reading from it's > stdin/stdout. > > That's quite cumbersome to write, and add