Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Txdui-00086I-JW for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Jan 2013 13:29:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Txduh-00063h-EP for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Jan 2013 13:29:19 +0000 Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Txduf-00063b-W3 for pgsql-hackers@postgresql.org; Tue, 22 Jan 2013 13:29:18 +0000 Received: from acidenitrix.villemain.org ([91.121.90.165]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Txdud-0007qm-Ph for pgsql-hackers@postgresql.org; Tue, 22 Jan 2013 13:29:17 +0000 Received: from [89.157.243.170] (helo=Dimitris-MacBook-Air.local) by acidenitrix.villemain.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Txduc-0000Fe-HL; Tue, 22 Jan 2013 14:29:14 +0100 From: Dimitri Fontaine To: Thom Brown Cc: Robert Haas , Alvaro Herrera , PostgreSQL Hackers Subject: Re: Event Triggers: adding information Organization: 2ndQuadrant References: <20130104205251.GB9191@alvh.no-ip.org> <20130109165829.GB4490@alvh.no-ip.org> User-Mail-Address: dimitri@2ndQuadrant.fr Date: Tue, 22 Jan 2013 14:28:54 +0100 In-Reply-To: (Thom Brown's message of "Tue, 22 Jan 2013 12:56:02 +0000") Message-ID: User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Thom Brown 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. > 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(); > So note that I'm coming into this syntax kinda fresh, so just giving > first impressions of the current implementation. Thanks for that, I'm all for getting something better at the end! Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers