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 13:37:21
Message-ID: CAA-aLv4BbPRCNdao_RVa2TNaW8kZxiScTLx5xCuDMnfgPWmXHA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 22 January 2013 13:28, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr> wrote:
> Thom Brown <thom(at)linux(dot)com> writes:
>> Would it be desirable to have ddl_command_success and
>> ddl_command_failed events. These would effectively be subsets to
>
> No, because you can't run any SQL in a failed transaction.

Okay, I had misunderstood something someone wrote previously, and that
makes sense now.

>> This, unfortunately, introducing awkwardness with the WHEN clause
>> restriction which doesn't accommodate simple equality. And looking at
>> the IN part of the syntax, it looks awful: WHEN TAG IN ('DROP
>> SEQUENCE' AND 'CREATE TABLE').
>
> The syntax is using a comma, not an "AND", as seen in the tests:
>
> create event trigger regress_event_trigger2 on ddl_command_start
> when tag in ('create table', 'CREATE FUNCTION')
> execute procedure test_event_trigger();

Ah, in that case, the docs are wrong:
http://www.postgresql.org/docs/devel/static/sql-createeventtrigger.html

--
Thom

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zoltán Böszörményi 2013-01-22 13:39:36 Re: Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]
Previous Message Dimitri Fontaine 2013-01-22 13:33:15 Re: Teaching pg_receivexlog to follow timeline switches