Re: Event Triggers: adding information

From: Thom Brown <thom(at)linux(dot)com>
To: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Event Triggers: adding information
Date: 2013-01-22 16:38:37
Message-ID: CAA-aLv647ziy1n3egwt5kbSn176GN5C4yvpnTfoj16Yv3SiO3A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 22 January 2013 16:28, Thom Brown <thom(at)linux(dot)com> wrote:
> On 22 January 2013 14:47, Thom Brown <thom(at)linux(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2013-01-22 16:44:04 Re: Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]
Previous Message Andres Freund 2013-01-22 16:30:58 Re: logical changeset generation v4