From: Erik Wienhold <ewie@ewie.name>
To: Atomic_Sheep <atomic.sheep@gmail.com>
To: pgsql-docs@lists.postgresql.org
Subject: Re: Cross-Product JOIN?
Date: Wed, 24 May 2023 21:10:37 +0200 (CEST)
Message-ID: <2053109544.160895.1684955437950@office.mailbox.org> (raw)
In-Reply-To: <1667253069.131800.1684935988763@office.mailbox.org>
References: <CAL3CXNMes1r4s78QnMAekj9W1nchGH7dbq86wyEFB2gxqQrJ-g@mail.gmail.com>
<1667253069.131800.1684935988763@office.mailbox.org>
> On 24/05/2023 15:46 CEST Erik Wienhold <ewie@ewie.name> wrote:
>
> 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.
>
> [0] https://www.postgresql.org/docs/15/queries-table-expressions.html
Here's a patch that fixes those two places.
--
Erik
Attachments:
[text/x-patch] 0001-Use-Cartesian-product-consistently-in-docs.patch (1.6K, ../2053109544.160895.1684955437950@office.mailbox.org/2-0001-Use-Cartesian-product-consistently-in-docs.patch)
download | inline diff:
From b23bd267ac9c4e79efb472c08dc35737bc8e9ca6 Mon Sep 17 00:00:00 2001
From: Erik Wienhold <ewie@ewie.name>
Date: Wed, 24 May 2023 20:21:47 +0200
Subject: [PATCH] Use Cartesian product consistently in docs
Fixes two places in the docs that use "cross product" instead of the
more common "Cartesian product", used throughout the rest of the docs.
For the NATURAL JOIN without common column names it is easiest to refer
to CROSS JOIN which is already described as the Cartesian product.
---
doc/src/sgml/queries.sgml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/src/sgml/queries.sgml b/doc/src/sgml/queries.sgmlindex 6986ec5c92..a75a241d62 100644--- a/doc/src/sgml/queries.sgml+++ b/doc/src/sgml/queries.sgml@@ -392,7 +392,7 @@ FROM <replaceable>table_reference</replaceable> <optional>, <replaceable>table_r
input tables. As with <literal>USING</literal>, these columns appear
only once in the output table. If there are no common
column names, <literal>NATURAL JOIN</literal> behaves like
- <literal>JOIN ... ON TRUE</literal>, producing a cross-product join.+ <literal>CROSS JOIN</literal>.
</para>
<note>
@@ -1362,7 +1362,7 @@ GROUPING SETS (
<para>
If multiple grouping items are specified in a single <literal>GROUP BY</literal>
- clause, then the final list of grouping sets is the cross product of the+ clause, then the final list of grouping sets is the Cartesian product of the
individual items. For example:
<programlisting>
GROUP BY a, CUBE (b, c), GROUPING SETS ((d), (e))
--
2.40.1
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: ewie@ewie.name, atomic.sheep@gmail.com, pgsql-docs@lists.postgresql.org
Subject: Re: Cross-Product JOIN?
In-Reply-To: <2053109544.160895.1684955437950@office.mailbox.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox