Re: Review of Writeable CTE Patch - Mailing list pgsql-hackers

From Marko Tiikkaja
Subject Re: Review of Writeable CTE Patch
Date
Msg-id 4B699EA9.4040200@cs.helsinki.fi
Whole thread Raw
In response to Re: Review of Writeable CTE Patch  (Robert Haas <robertmhaas@gmail.com>)
List 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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Review of Writeable CTE Patch
Next
From: Robert Haas
Date:
Subject: Re: Review of Writeable CTE Patch