Re: BUG #12000: "CROSS JOIN" not equivalent to "," - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #12000: "CROSS JOIN" not equivalent to ","
Date
Msg-id 13989.1416333351@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #12000: "CROSS JOIN" not equivalent to ","  (David G Johnston <david.g.johnston@gmail.com>)
Responses Re: BUG #12000: "CROSS JOIN" not equivalent to ","
List pgsql-bugs
David G Johnston <david.g.johnston@gmail.com> writes:
> Tom Lane-2 wrote
>> A simple "fix" would be to remove the claim about "," and just compare
>> CROSS JOIN to INNER JOIN ON TRUE.  I'm not really convinced that's an
>> improvement ...

> How about adding the following to that sentence:

> "However, in the presence of three or more joined relations it is
> recommended to only use either explicit joins or commas since mixing them
> introduces non-obvious join order differences."

I don't think it's the place of the manual to be prescriptive about style;
at least, not here.

We could do something like "<CROSS JOIN example> is equivalent to <INNER JOIN ON
TRUE example>.  <CROSS JOIN example> is also equivalent to <example with
comma>, but in cases with more than two tables this equivalence is not
exact, because JOIN binds more tightly than comma."

Or maybe put the "but" in a footnote.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: BUG #12000: "CROSS JOIN" not equivalent to ","
Next
From: David Johnston
Date:
Subject: Re: BUG #12000: "CROSS JOIN" not equivalent to ","