On 3 March 2012 13:45, Dimitri Fontaine <dimi...@2ndquadrant.fr> wrote:
> Robert Haas <robertmh...@gmail.com> writes:
>>>>       CREATE COMMAND TRIGGER name ... properties ...;
>>>>       DROP COMMAND TRIGGER name;
>>>> full stop.  If you want to run the same trigger function on some
>>>> more commands, add another trigger name.
>>> +1
>> +1.  I suggested the same thing a while back.
> Yeah, I know, I just wanted to hear from more people before ditching out
> a part of the work I did, and Thom was balancing in the opposite
> direction.

I was?  I agreed with Tom's comment, but I did query your
interpretation of it with regards to the CREATE COMMAND TRIGGER
statement.  It seems you removed the ability to create a command
trigger against multiple commands, but I don't think that was the
problem.  It was the DROP COMMAND TRIGGER statement that garnered
comment, as it makes more sense to drop the entire trigger than
individual commands for that trigger.  Initially I had proposed a way
to drop all commands on a trigger at once as an additional option, but
just dropping it completely or not at all is preferable.

But if there is agreement to have multiple commands on a command
trigger, I'm wondering whether we should have an OR separator rather
than a comma?  The reason is that regular triggers define a list of
statements this way.  Personally I prefer the comma syntax, but my
concern (not a strong concern) is for lack of consistency.


Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to