Re: [HACKERS] WITH ... VALUES

2010-02-12 Thread Tom Lane
Jeff Davis writes: > On Fri, 2010-02-12 at 16:59 -0500, Tom Lane wrote: >> AFAICT there isn't any actual use case for this because you can't >> reference the WITH clause from the body of VALUES: > with tmp2 as (select a + 1 as b from tmp) > values((select b from tmp2)); Ah, sneaky. Never

Re: [HACKERS] WITH ... VALUES

2010-02-12 Thread Jeff Davis
On Fri, 2010-02-12 at 16:59 -0500, Tom Lane wrote: > Came across something interesting while looking at Marko Tiikkaja's > cut-down WITH patch. I see that our grammar allows a WITH clause in > front of VALUES, and analyze.c makes some effort to process it, but > AFAICT there isn't any actual use c

[HACKERS] WITH ... VALUES

2010-02-12 Thread Tom Lane
Came across something interesting while looking at Marko Tiikkaja's cut-down WITH patch. I see that our grammar allows a WITH clause in front of VALUES, and analyze.c makes some effort to process it, but AFAICT there isn't any actual use case for this because you can't reference the WITH clause fr