Re: no test programs in contrib - Mailing list pgsql-hackers

From Tom Lane
Subject Re: no test programs in contrib
Date
Msg-id 20725.1416951566@sss.pgh.pa.us
Whole thread Raw
In response to Re: no test programs in contrib  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> On 11/24/14 10:46 AM, Tom Lane wrote:
>> I think that test_parser is arguably useful as a skeleton/example for
>> user-written TS parsers, so I'd lean towards leaving it where it is,
>> but the others could move to src/test/ IMO.

> I think a useful dividing line would be, is it normally useful to
> install?  A skeleton is still useful if it is in a different place in
> the source tree (arguably more useful).  It's not useful if it's
> installed as a *.so.

I agree that where it is in the source tree isn't all that exciting
(for any purpose other than back-patching).  What is exciting is what
the context and build infrastructure look like.  The fact that test_parser
is packaged as a .so and can be built with PGXS makes it very easy to copy
as a skeleton for a user-written parser --- you don't need to invent your
own Makefile, in particular.  Now, maybe we'd retain those properties if
it were under src/test/, but that was not immediately clear to me.

Agreed that it shouldn't be installed as part of a standard binary
distribution, though.  We could potentially fix that while keeping it
in contrib, but maybe relocating it would be clearer.

What do we do about docs, though?  These things do need some user-facing
docs, or people won't even know they exist to be copied.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: no test programs in contrib
Next
From: Tomas Vondra
Date:
Subject: Re: PITR failing to stop before DROP DATABASE