Marko Tiikkaja <marko.tiikk...@cs.helsinki.fi> writes:
> => with t as (delete from foo returning *)
> -> insert into bar
> -> select * from t;
> INSERT 0 2

> It correctly reports 2 affected rows (one deleted and one inserted), but 
> is this the answer we want?

No.  The returned tag should consider only the top-level operation,
not what happened inside any CTEs.

                        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

Reply via email to