Re: doc examples for pghandler - Mailing list pgsql-hackers

From Tom Lane
Subject Re: doc examples for pghandler
Date
Msg-id 796709.1592014421@sss.pgh.pa.us
Whole thread Raw
In response to Re: doc examples for pghandler  (Mark Wong <mark@2ndquadrant.com>)
Responses Re: doc examples for pghandler  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
Mark Wong <mark@2ndquadrant.com> writes:
> On Fri, Jun 12, 2020 at 03:10:20PM -0400, Tom Lane wrote:
>> I wonder if it'd be possible to adapt what you have here into some
>> tiny contrib module that doesn't do very much useful, but can at
>> least be tested to see that it compiles; moreover it could be
>> copied verbatim to serve as a starting point for a new PL.

> I do have the code examples in a repo. [1]  The 0.4 directory consists
> of everything the examples show.  

> It would be easy enough to adapt that for contrib, and move some of the
> content from the doc patch into that.  Then touch up the handler chapter
> to reference the contrib module.

On second thought, contrib/ is not quite the right place, because we
typically expect modules there to actually get installed, meaning they
have to have at least some end-user usefulness.  The right place for
a toy PL handler is probably src/test/modules/; compare for example
src/test/modules/test_parser/, which is serving quite the same sort
of purpose as a skeleton text search parser.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Chapman Flack
Date:
Subject: Re: what can go in root.crt ?
Next
From: Pavel Stehule
Date:
Subject: Re: Reduce timing overhead of EXPLAIN ANALYZE using rdtsc?