pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@postgresql.org, Thom Brown <thom@linux.com>
Cc: Dimitri Fontaine <dimitri@2ndquadrant.fr>
Subject: Re: Command Triggers, patch v11
Date: Mon, 19 Mar 2012 12:45:11 -0400
Message-ID: <3115.1332175511@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+Tgmoa5T-WHeLYMKHgfs20GVUDYDcrOA0WzcLtQO=CtM8ZYzg@mail.gmail.com>
References: <m24nufq466.fsf@2ndQuadrant.fr>
	<9503.1332006327@sss.pgh.pa.us>
	<24814.1332021870@sss.pgh.pa.us>
	<201203172326.53461.andres@anarazel.de>
	<18353.1332095370@sss.pgh.pa.us>
	<CA+Tgmoa5T-WHeLYMKHgfs20GVUDYDcrOA0WzcLtQO=CtM8ZYzg@mail.gmail.com>

Robert Haas <robertmhaas@gmail.com> writes:
> On Sun, Mar 18, 2012 at 2:29 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> 1. ExecuteQuery still has to know that's a CREATE TABLE AS operation so
>> that it can enforce that the prepared query is a SELECT.  (BTW, maybe
>> this should be weakened to "something that returns tuples", in view of
>> RETURNING?)

> +1 for "something that returns with tuples".   CREATE TABLE ... AS
> DELETE FROM ... WHERE ... RETURNING ... seems like a cool thing to
> support.

For the moment I've backed off that idea.  The main definitional
question we'd have to resolve is whether we want to allow WITH NO DATA,
and if so what does that mean (should the DELETE execute, or not?).
I am also not certain that the RETURNING code paths would cope with
a WITH OIDS specification, and there are some other things that would
need fixed.  It might be cool to do it sometime, but it's not going to
happen in this patch.

			regards, tom lane



view thread (115+ messages)  latest in thread

Message-ID: <3115.1332175511@sss.pgh.pa.us>
Permalink:  ../3115.1332175511@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3115.1332175511@sss.pgh.pa.us

 · 

reply

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, robertmhaas@gmail.com, andres@anarazel.de, thom@linux.com, dimitri@2ndquadrant.fr
  Subject: Re: Command Triggers, patch v11
  In-Reply-To: <3115.1332175511@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