Re: [COMMITTERS] pgsql: Add sql_drop event for event triggers

From: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org, pgsql-committers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: Add sql_drop event for event triggers
Date: 2013-04-09 16:25:59
Message-ID: m2ehejbrhk.fsf@2ndQuadrant.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> Actually ... wait a moment. That does have some attraction independent
> of performance questions, because what Alvaro suggested requires knowing
> which commands support command triggers in two places. Perhaps with
> some refactoring we could end up with no net addition of cruft.

That was the idea yes, that's the right context now.

About the refactoring itself, how much do we want to keep the compiler
help about covering all the items in the switch? Other than that,
changing the breaks into returns in the first switch looks like it would
do the work, we don't even need a goto cleanup.

> Personally, I'd really like to see the InvokeDDLCommandEventTriggers
> macros go away; that's not a coding style I find nice. If we had a
> separate switch containing just the event-supporting calls, we could
> drop that in favor of one invocation of the trigger stuff before and
> after the switch.

That needs either lots of code duplication or some smarts that I don't
see yet, because of the EventTriggerSupportsObjectType stuff. Anyways
I'm not much into C macrology myself…

At best I can find some time and work on that from Thursday.

Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2013-04-09 16:28:03 Re: [COMMITTERS] pgsql: Add sql_drop event for event triggers
Previous Message Robert Haas 2013-04-09 16:22:10 Re: [HACKERS] pgsql: Add sql_drop event for event triggers

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitri Fontaine 2013-04-09 16:27:13 Re: Call for Google Summer of Code mentors, admins
Previous Message Robert Haas 2013-04-09 16:22:10 Re: [HACKERS] pgsql: Add sql_drop event for event triggers