On Jan 12, 2006, at 12:21 , Tom Lane wrote:
> I think what's happening is that the parser implicitly parenthesizes
> like this:
>
> from ((a join b on a.x=b.y) join c on b.y=c.z)
Any idea off hand if the SQL spec has anything to say on the subject?
I haven't dug into my local version of the final draft to see.
>> I believe both join conditions and
>> restrictions are rewritten as they'd appear in the WHERE clause, so
>> you *could* put them all in the WHERE clause.
>
> Again, this is true for inner joins but very much not the case if
> any outer joins are involved.
Thanks for the clarification, Tom. While I was writing I thought that
OUTER JOIN was an exception, but I neglected to look into it or
include my thoughts.
Michael Glaesemann
grzm myrealbox com