Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q1opE-0007Tc-4N for pgsql-docs@arkaria.postgresql.org; Wed, 24 May 2023 13:46:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q1opB-0005AV-VA for pgsql-docs@arkaria.postgresql.org; Wed, 24 May 2023 13:46:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q1opB-00057i-Nf for pgsql-docs@lists.postgresql.org; Wed, 24 May 2023 13:46:45 +0000 Received: from mout-u-204.mailbox.org ([2001:67c:2050:101:465::204]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q1op3-001saK-Uk for pgsql-docs@lists.postgresql.org; Wed, 24 May 2023 13:46:45 +0000 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-204.mailbox.org (Postfix) with ESMTPS id 4QRCC950lJz9sVl; Wed, 24 May 2023 15:46:29 +0200 (CEST) Date: Wed, 24 May 2023 15:46:28 +0200 (CEST) From: Erik Wienhold To: Atomic_Sheep , pgsql-docs@lists.postgresql.org Message-ID: <1667253069.131800.1684935988763@office.mailbox.org> In-Reply-To: References: Subject: Re: Cross-Product JOIN? MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Normal List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 24/05/2023 10:22 CEST Atomic_Sheep wrote: > > "Finally, NATURAL is a shorthand form of USING: it forms a USING list > consisting of all column > names that appear in both input tables. As with USING, these columns > appear only once in the > output table. If there are no common column names, NATURAL JOIN > behaves like JOIN ... > ON TRUE, producing a cross-product join." > > Did it mean cartesian product and not cross-product? Cross product means cartesian product in this context. So technically correct. Personally, I think it should read cartesian product because cross product is an overloaded term and cartesian product is used more often in the documentation overall. But the same page [0] also uses cross product when talking about grouping sets. The source code uses cross product in a couple of comments, though. [0] https://www.postgresql.org/docs/15/queries-table-expressions.html -- Erik