X-Original-To: pgsql-docs-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id E8252D1B4E9 for ; Tue, 4 Nov 2003 01:35:51 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 86523-04 for ; Mon, 3 Nov 2003 21:35:24 -0400 (AST) Received: from eis-msg-012.jpl.nasa.gov (eis-msg-012.jpl.nasa.gov [137.78.160.40]) by svr1.postgresql.org (Postfix) with ESMTP id CDCDCD1B4E1 for ; Mon, 3 Nov 2003 21:35:20 -0400 (AST) Received: from [137.78.212.225] (laphotz.jpl.nasa.gov [137.78.212.225]) by eis-msg-012.jpl.nasa.gov (8.12.10/8.12.10) with ESMTP id hA41ZDvS008860; Mon, 3 Nov 2003 17:35:14 -0800 (PST) Mime-Version: 1.0 X-Sender: hotz@mail.jpl.nasa.gov Message-Id: In-Reply-To: <17695.1067906301@sss.pgh.pa.us> References: <1503129.DJSjvup6Wb@weyoun.foo.at> <3687.1067554564@sss.pgh.pa.us> <17695.1067906301@sss.pgh.pa.us> Date: Mon, 3 Nov 2003 17:35:11 -0800 To: Tom Lane From: "Henry B. Hotz" Subject: Re: INNER JOINS in sql-select.html Cc: Stefan Weiss , pgsql-docs@postgresql.org Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/8 X-Sequence-Number: 2085 At 7:38 PM -0500 11/3/03, Tom Lane wrote: >"Henry B. Hotz" 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.B.Hotz@jpl.nasa.gov, or hbhotz@oxy.edu