Re: INNER JOINS in sql-select.html

From: "Henry B(dot) Hotz" <hotz(at)jpl(dot)nasa(dot)gov>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Stefan Weiss <spaceman-4b9f8-20030703(at)ausgehaucht(dot)sensenmann(dot)at>, pgsql-docs(at)postgresql(dot)org
Subject: Re: INNER JOINS in sql-select.html
Date: 2003-11-04 01:35:11
Message-ID: p05210608bbccb29c0608@[137.78.212.225]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

At 7:38 PM -0500 11/3/03, Tom Lane wrote:
>"Henry B. Hotz" <hotz(at)jpl(dot)nasa(dot)gov> writes:
>> You can imply the issue without obfuscating things. How about:
>
>> A CROSS JOIN or INNER JOIN is a simple Cartesian product, the same
>> as you get from listing the two items at the top level of FROM.
>> CROSS JOIN yields the same results as INNER JOIN ON (TRUE), that is,
>> no rows are removed by qualification.
>
>Okay, but that doesn't do the trick --- it implies that CROSS JOIN isn't
>equivalent to INNER JOIN ON (TRUE), when in fact they are equivalent,
>both as to result and performance characteristics. The issue at hand is
>that an explicit "a JOIN b" may not be equivalent to "FROM a, b".
>
>I reworded the passage as
>
> CROSS JOIN and INNER JOIN
> produce a simple Cartesian product, the same result as you get from
> listing the two items at the top level of FROM,
> but restricted by the join condition (if any).
> CROSS JOIN is equivalent to INNER JOIN ON
> (TRUE), that is, no rows are removed by qualification.
>
>does that help?

'sarright. I was just wordsmithing without worrying about the meaning.
--
The opinions expressed in this message are mine,
not those of Caltech, JPL, NASA, or the US Government.
Henry(dot)B(dot)Hotz(at)jpl(dot)nasa(dot)gov, or hbhotz(at)oxy(dot)edu

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2003-11-04 23:33:09 <comment> seems to be broken
Previous Message Tom Lane 2003-11-04 00:38:21 Re: INNER JOINS in sql-select.html