Re: Command Triggers patch v18 - Mailing list pgsql-hackers

From Thom Brown
Subject Re: Command Triggers patch v18
Date
Msg-id CAA-aLv4ocuA-yP+ojKnSm-gEseg7ecrLsiGGNYeNNam-skpZ3Q@mail.gmail.com
Whole thread Raw
In response to Command Triggers patch v18  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Responses Re: Command Triggers patch v18  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
List pgsql-hackers
On 20 March 2012 17:49, Dimitri Fontaine <dimitri@2ndquadrant.fr> wrote:
> Hi,
>
> I guess I sent v17 a little early considering that we now already have
> v18 including support for CREATE TABLE AS and SELECT INTO, thanks to the
> work of Andres and Tom.
>
> There was some spurious tags in the sgml files in v17 that I did clean
> up too.

The new command triggers work correctly.

Having looked at your regression tests, you don't seem to have enough
"before" triggers in the tests.  There's no test for before CREATE
TABLE, CREATE TABLE AS or SELECT INTO.  In my tests I have 170 unique
command triggers, but there are only 44 in the regression test.  Is
there a reason why there aren't many tests?

A problem still outstanding is that when I build the docs, the CREATE
COMMAND TRIGGER is listed after COMMAND TRIGGER in
html/sql-commands.html.  I recall you mentioned you didn't have this
issue on your side.  Can you just confirm this again?  I believe I've
located the cause of this problem.  In doc/src/sgml/reference.sgml the
ALTER/CREATE/DROP COMMAND TRIGGER references are placed below their
respective trigger counterparts.  Putting them back into alphabetical
order corrects the issue.

On the pg_cmdtrigger page in the documentation, I'd recommend the
following changes:

s/Trigger's name/Trigger name/

s/Command TAG/Command tag/

s/The OID of the function that is called by this command trigger./The
OID of the function called by this command trigger./

Also "contype" should read "ctgtype".

Note that I haven't tested pl/Perl, pl/Python or pl/tcl yet.

Regards

-- 
Thom


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: lots of unused variable warnings in assert-free builds
Next
From: Merlin Moncure
Date:
Subject: Re: Regarding column reordering project for GSoc 2012