Merlin Moncure <mmonc...@gmail.com> writes: > On Thu, Oct 8, 2009 at 6:52 AM, Robert Haas <robertmh...@gmail.com> wrote: >> up to the main query. For what may turn out to be pretty common uses >> cases like WITH tuples AS (DELETE FROM big_table_1 RETURNING ...) >> INSERT INTO big_table_2 ... this is going to suck pretty bad. I
> Is the above form: > with x as (delete .. returning *) insert into y select * from x > going to be allowed? I was informed on irc that it wasn't...it would > have to be written as: > insert into y with x as (delete .. returning *) select * from x I would think that we would require the former and forbid the latter. One of the basic limitations of the feature is going to be that you can only have WITH (something RETURNING) at the top level, and the latter syntax doesn't look like that to me. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers