Re: wCTE behaviour

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Yeb Havinga <yebhavinga@gmail.com>
Cc: Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>, Hitoshi Harada <umi.tanuki@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>, Tom Lane <tgl@sss.pgh.pa.us>, David Fetter <david@fetter.org>
Date: 2010-11-14T21:31:02Z
Lists: pgsql-hackers
On Sun, Nov 14, 2010 at 1:51 PM, Yeb Havinga <yebhavinga@gmail.com> wrote:
> On 2010-11-14 19:35, Robert Haas wrote:
>>
>> On Sun, Nov 14, 2010 at 1:01 PM, Marko Tiikkaja
>> <marko.tiikkaja@cs.helsinki.fi>  wrote:
>>>
>>> In my opinion, all of these should have the same effect: DELETE all rows
>>> from "foo".  Any other option means we're going to have trouble
>>> predicting
>>> how a query is going to behave.
>>
>> I think it's clear that's the only sensible behavior.
>
> What if CTE's ever get input parameters?

Then they'd be functions, which we already have.  As Tom recently
pointed out, you can even make them temporary with an explicit pg_temp
schema qualification.  Perhaps someday we'll have lambda-expressions,
but I have no reason to believe that they'll use any of the wCTE
syntax.

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