Re: Common Table Expressions applied; some issues remain - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Common Table Expressions applied; some issues remain
Date
Msg-id 26465.1243395394@sss.pgh.pa.us
Whole thread Raw
In response to Re: Common Table Expressions applied; some issues remain  (Hitoshi Harada <umi.tanuki@gmail.com>)
List pgsql-hackers
Hitoshi Harada <umi.tanuki@gmail.com> writes:
> 2009/5/27 Tom Lane <tgl@sss.pgh.pa.us>:
>> I could still see doing what I mentioned in the prior message, which is
>> to flatten CTEs as if they are plain sub-selects when
>> 
>> 1. they are non-recursive,
>> 2. they are referenced only once, and
>> 3. they contain no volatile functions.

> And 4. only if the sub-selects use index scan? Or in other cases would
> it be effective?

Uh ... you've got the causality backwards, and I don't see the point of
such a restriction anyway.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Hitoshi Harada
Date:
Subject: Re: Common Table Expressions applied; some issues remain
Next
From: Robert Haas
Date:
Subject: Re: commitfest management webapp