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 15:56:01
Message-ID: m2y5crbsvi.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:
> Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
>> (Someone might still complain that we cause a PG_TRY in BEGIN
>> TRANSACTION etc. Not sure if this is something we should worry about.
>> Robert did complain about this previously.)
>
> I think it would be difficult and probably dangerous to have PG_TRY
> for only some utility commands, so not much to be done about that.
> The main thing is to not invoke event trigger code for BEGIN/ABORT/SET.

What about splitting the big switch statement into two of them? The
first one for transaction control statements, and then the other bigger
one.

Maybe we could even rework the code (either in some other switch
statements or just by physical lines proximity) so that TCL, DCL, DDL,
etc are each in easy to spot blocks, which is more or less true as of
today, but not exactly so IIRC.

Then we don't need new support code, and we can even continue using the
current macro.

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 15:59:10 Re: [COMMITTERS] pgsql: Add sql_drop event for event triggers
Previous Message Tom Lane 2013-04-09 15:51:05 Re: [COMMITTERS] pgsql: Add sql_drop event for event triggers

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-04-09 15:59:10 Re: [COMMITTERS] pgsql: Add sql_drop event for event triggers
Previous Message Tom Lane 2013-04-09 15:51:05 Re: [COMMITTERS] pgsql: Add sql_drop event for event triggers