On Mon, Sep 7, 2009 at 7:47 PM, Tom Lane<t...@sss.pgh.pa.us> wrote: > Robert Haas <robertmh...@gmail.com> writes: >> On Mon, Sep 7, 2009 at 3:43 AM, Peter Eisentraut<pete...@gmx.net> wrote: >>> You could argue that the parser could infer the references and the >>> resultant join ordering restrictions automatically, but perhaps it was >>> deemed that an explicit specification would be less error-prone. > >> Well, the irony is that our current code does already infer the >> references - and then disallows them. > > Because as often as not, they're mistakes. Please don't think > you're smarter than the spec here.
You're frequently the first to criticize the spec, but I have no interest in second-guessing whatever behavior the spec specifies for this construct. I'm just trying to understand it, and as far as I can tell, LATERAL() is just a piece of syntactic sugar that allows expressions within to reference FROM items at the same query level. As far as I can tell, it doesn't change the semantic of any legal queries - it just renders legal notation that otherwise would be rejected. But is my understanding correct? I haven't got a copy of the spec, so that's a bit of a handicap. If someone who does can look this up and comment on how it's supposed to work, I would certainly appreciate that. My understanding of it is currently based on random articles cherry-picked around the Internet and a handful of emails from archives.postgresql.org, which seems a little thin. ...Robert -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers