Re: tap tests driving the database via psql

From: Andres Freund <andres(at)anarazel(dot)de>
To: David Fetter <david(at)fetter(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org, Craig Ringer <craig(at)2ndquadrant(dot)com>
Subject: Re: tap tests driving the database via psql
Date: 2019-07-27 21:14:55
Message-ID: 20190727211455.pio2kn3nxjejjo5x@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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, so it's clearer that it's not ment as an actual
> > official driver.
>
> There's one that may or may not need updates that's basically just a
> wrapper around libpq.
>
> https://ftp.postgresql.org/pub/projects/gborg/pgperl/stable/

That's pretty darn old however (2002). Needs to be compiled. And is GPL
v1 / Artistic v1 licensed. I think all of the other alternatives are
better than this.

> > The obvious disadvantage is that this would be a noticable amount of
> > code. But it's also not that crazily much.
> >
> > One big advantage I can see is that that'd make it a lot easier to
> > write low-level protocol tests. Right now we either don't have them,
> > or they have to go through libpq, which quite sensibly doesn't expose
> > all the details to the outside. IMO it'd be really nice if we had a
> > way to to write low level protocol tests, especially for testing
> > things like the v2 protocol.
>
> That sounds worth doing as a separate thing

What would be the point of doing this separately? If we have a small
driver for writing protocol tests, why would we want something
separate for the tap tests?

> and an obvious application of it would be something like a febesmith,
> which would get us a better idea as to whether we've implemented the
> protocol we say we have.

Hm, not convinced that's useful. And fairly sure that's pretty
independent of what I was writing about.

Greetings,

Andres Freund

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2019-07-27 21:48:39 Re: tap tests driving the database via psql
Previous Message Peter Geoghegan 2019-07-27 20:53:35 Re: Testing LISTEN/NOTIFY more effectively