Re: LATERAL, UNNEST and spec compliance - Mailing list pgsql-hackers

From Tom Lane
Subject Re: LATERAL, UNNEST and spec compliance
Date
Msg-id 5217.1359145616@sss.pgh.pa.us
Whole thread Raw
In response to Re: LATERAL, UNNEST and spec compliance  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes:
> * Tom Lane (tgl@sss.pgh.pa.us) wrote:
>> SELECT ... FROM a WHERE a.x IN (SELECT ... FROM b, srf(y) WHERE ...)

> Actually, this appears to fail already, at least in 9.2.2:

> => select * from (values (1)) v(a) where v.a in (select x from (values (2)) v2(a), 
> ->                     generate_series(1,a) x);
> ERROR:  function expression in FROM cannot refer to other relations of same query level
> LINE 2:                     generate_series(1,a) x);
>                                               ^

Huh ... you're right, I'd forgotten about that.  That's an ancient bug
that got fixed in passing in the LATERAL work.  So, as long as we're not
going to fix that bug in the back branches (which would be difficult
anyway IIRC), we don't have a compatibility problem ...
        regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Question regarding Sync message and unnamed portal
Next
From: Bruce Momjian
Date:
Subject: Re: Question regarding Sync message and unnamed portal