Re: Event Triggers: adding information
Thom Brown <thom@linux.com>
From: Thom Brown <thom@linux.com>
To: Dimitri Fontaine <dimitri@2ndquadrant.fr>
Cc: Robert Haas <robertmhaas@gmail.com>, Alvaro Herrera <alvherre@2ndquadrant.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2013-01-22T16:38:37Z
Lists: pgsql-hackers
On 22 January 2013 16:28, Thom Brown <thom@linux.com> wrote:
> On 22 January 2013 14:47, Thom Brown <thom@linux.com> wrote:
>
> postgres=# CREATE EVENT TRIGGER cmd_trg_after_any_command ON
> ddl_command_end WHEN TAG IN ('ANY COMMAND') EXECUTE PROCEDURE
> cmd_trg_info();
> CREATE EVENT TRIGGER
I can see why this works now. The ddl_command_end option stops the
TAG being evaluated:
test2=# CREATE EVENT TRIGGER cmd_trg_before_any_command ON
ddl_command_end WHEN TAG IN ('MEOW LIKE A CAT') EXECUTE PROCEDURE
cmd_trg_info_any();
CREATE EVENT TRIGGER
...unless I've coincidentally stumbled upon the new MEOW LIKE A CAT
command coming in 9.3. ;)
--
Thom