Re: [HACKERS] SQL standard question about Common Table Expressions

2008-09-08 Thread Jeff Davis
On Tue, 2008-09-09 at 01:45 +0100, Andrew Gierth wrote: > The "contains" language in the spec is tricky. And I think there's some > issue here with the spec confusing and expression body>; some of the language refers to "If a > AQEk not marked as recursive is immediately contained in a expressi

Re: [HACKERS] SQL standard question about Common Table Expressions

2008-09-08 Thread Andrew Gierth
> "Jeff" == Jeff Davis <[EMAIL PROTECTED]> writes: Jeff> I am looking into the SQL standard to try to determine Jeff> precisely how the CTE feature should behave. Jeff> Taking a simple case like: Jeff> with recursive Jeff> foo(i) as Jeff> (values(1) Jeff> union all

[HACKERS] SQL standard question about Common Table Expressions

2008-09-08 Thread Jeff Davis
I am looking into the SQL standard to try to determine precisely how the CTE feature should behave. Taking a simple case like: with recursive foo(i) as (values(1) union all select i+1 from foo where i < 5) select * from foo; And looking at the SQL standard 200n 7.13: Ge