Re: Review of Writeable CTE Patch
Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>
From: Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Takahiro Itagaki <itagaki.takahiro@oss.ntt.co.jp>, Merlin Moncure <mmoncure@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2010-02-03T16:04:57Z
Lists: pgsql-hackers
Hi, On 2010-02-03 16:09 UTC+2, Robert Haas wrote: > Why can't we complain about the actual SQL statement the user issued? > Like, say: > > INSERT requires RETURNING when used within a referenced CTE The SELECT equivalent of this query looks like this: => with recursive t as (select * from t) values(true); ERROR: recursive query "t" does not have the form non-recursive-term UNION [ALL] recursive-term but I didn't want to throw people off to think that they can use INSERT/UPDATE/RETURNING in a RECURSIVE CTE, just to get complaints about syntax error. Regards, Marko Tiikkaja