Re: [HACKERS] pgsql: Add sql_drop event for event triggers - Mailing list pgsql-committers

From Tom Lane
Subject Re: [HACKERS] pgsql: Add sql_drop event for event triggers
Date
Msg-id 10947.1367123337@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] pgsql: Add sql_drop event for event triggers  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Responses Re: [HACKERS] pgsql: Add sql_drop event for event triggers  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
List pgsql-committers
Dimitri Fontaine <dimitri@2ndQuadrant.fr> writes:
> Tom Lane <tgl@sss.pgh.pa.us> writes:
>> Yeah, I was just looking at the IfSupported variant.  In the structure
>> I just suggested (separate ProcessSlowUtility function), we could make
>> that work by having switch cases for some statements in both functions,

> I've done it the way you propose here, and then in the Slow variant we
> have two set of cases again: those with some manual transactionnal
> behavior or some other code complexities, and the really simple ones.

> The attached patch involves a second layer of distinction to simplify
> the code fully and remove all the Event Trigger related macrology that I
> didn't much like. Maybe that's going a tad too far, see what you think.

Applied with some further hacking.

> Of course the patch passes make check.

Hmm, that leads me to wonder exactly how extensively the regression
tests test event triggers, because it sure looked to me like there
were multiple bugs left in this version.

> Finally, I've been surprised to find out that those cases are only
> triggering for "ddl_event_start" (and not "ddl_event_end"), I think
> that's a bug we should be fixing:

Agreed, I fixed it.

            regards, tom lane


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Editorialize a bit on new ProcessUtility() API.
Next
From: Simon Riggs
Date:
Subject: pgsql: Introduce new page checksum algorithm and module.