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

From Robert Haas
Subject Re: Command Triggers patch v18
Date
Msg-id CA+TgmoZdFvREnEV8-ytVjM6-ti-KSUnRACwjek1ae9hRQuZOFg@mail.gmail.com
Whole thread Raw
In response to Re: Command Triggers patch v18  (Thom Brown <thom@linux.com>)
Responses Re: Command Triggers patch v18  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
List pgsql-hackers
On Thu, Mar 29, 2012 at 9:01 AM, Thom Brown <thom@linux.com> wrote:
> On 29 March 2012 13:30, Dimitri Fontaine <dimitri@2ndquadrant.fr> wrote:
>> I'll go make that happen, and still need input here. We first want to
>> have command triggers on specific commands or ANY command, and we want
>> to implement 3 places from where to fire them.
>>
>> Here's a new syntax proposal to cope with that:
>>
>>     create command trigger before COMMAND_STEP of alter table
>>          execute procedure snitch();
>>
>>  - before the process utility switch, with only command tag and parse
>>   tree
>>
>>     create command trigger foo before start of alter table
>>          execute procedure snitch();
>>
>>  - before running the command, after having done basic error checks,
>>   security checks, name lookups and locking, with all information
>>
>>     create command trigger before execute of alter table
>>          execute procedure snitch();
>>
>>  - after having run the command
>>
>>     create command trigger foo before end of alter table
>>          execute procedure snitch();
>
> Is it necessary to add this complexity in this version?  Can't we keep
> it simple but in a way that allows the addition of this later?  The
> testing of all these new combinations sounds like a lot of work.

I concur.  This is way more complicated than we should be trying to do
in version 1.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Standbys, txid_current_snapshot, wraparound
Next
From: Marko Kreen
Date:
Subject: Re: Standbys, txid_current_snapshot, wraparound