Re: LATERAL, UNNEST and spec compliance

Stephen Frost <sfrost@snowman.net>

From: Stephen Frost <sfrost@snowman.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: David Fetter <david@fetter.org>, PG Hackers <pgsql-hackers@postgresql.org>
Date: 2013-01-25T19:46:46Z
Lists: pgsql-hackers
* 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);
                                              ^

Unless it's something else that you were referring to...?

	Thanks,

		Stephen