Robert Haas <robertmh...@gmail.com> writes: > On Mon, Aug 6, 2012 at 11:09 AM, Tom Lane <t...@sss.pgh.pa.us> wrote: >> Uh, what exactly? AFAICT from that blog entry, "x OUTER APPLY y" is >> exactly the same as "x LEFT JOIN LATERAL y ON true". Okay, so you >> saved three words, but is that a good enough reason to invent a >> nonstandard syntax?
> I wasn't sure that x LEFT JOIN LATERAL (SELECT * FROM y) ON true is > valid syntax. I thought that perhaps LATERAL() was only allowed > around a top-level FROM-list item. No. LATERAL is allowed in a <table reference>, which can be either a top-level FROM item or a component of a JOIN nest. (My current patch doesn't actually work for the latter case, but I'm going to work on fixing that next.) What's curious about that Sybase blog is that the blogger seems to think that LATERAL can only be used at top level ... but I'm not sure if that's actually a restriction in Sybase, or just a gap in his knowledge. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers