Re: top-level DML under CTEs

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Merlin Moncure <mmoncure@gmail.com>
Cc: Hitoshi Harada <umi.tanuki@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2010-09-13T19:14:49Z
Lists: pgsql-hackers
On Mon, Sep 13, 2010 at 2:43 PM, Merlin Moncure <mmoncure@gmail.com> wrote:
> Just to be clear, the attached patch is missing the part of the wCTE
> that allows queries of the form:
> WITH foo AS (DELETE * FROM bar RETURNING *) <any query using foo>

Understood.

> IOW, your CTE query has to be a select.  This is still highly useful
> however.

Agreed.

> The patch itself looks very clean after a quick glance
> (which is all I can offer ATM unfortunately).

Yeah, I haven't had a chance to look at it either, just wanted to send props.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company