From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
To: pgsql-hackers@postgresql.org, Thom Brown <thom@linux.com>
To: Dimitri Fontaine <dimitri@2ndquadrant.fr>
Subject: Re: Command Triggers, patch v11
Date: Sat, 17 Mar 2012 13:45:27 -0400
Message-ID: <9503.1332006327@sss.pgh.pa.us> (raw)
In-Reply-To: <7094.1331996567@sss.pgh.pa.us>
References: <m24nufq466.fsf@2ndQuadrant.fr>
<201203162237.38813.andres@anarazel.de>
<21818.1331934775@sss.pgh.pa.us>
<201203162317.43818.andres@anarazel.de>
<7094.1331996567@sss.pgh.pa.us>
While looking at this I also noticed that DECLARE CURSOR uses a
structure that's randomly different in yet a third way: we start
with a utility statement containing a query, and then flip that
upside down so that the SELECT Query contains a utility statement!
I have a vague feeling that I'm the one who's guilty of that hack, too.
I'm not sure that anybody cares about being able to fire command
triggers on DECLARE CURSOR, but just from a consistency standpoint it
would make sense for this to work more like EXPLAIN and CREATE TABLE AS.
So that convinces me that UtilityContainsQuery() would be a good thing,
and I'll add that to the patch. (Actually changing DECLARE CURSOR seems
like a separate patch, though.)
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, thom@linux.com, dimitri@2ndquadrant.fr
Subject: Re: Command Triggers, patch v11
In-Reply-To: <9503.1332006327@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox