> On 24/05/2023 15:46 CEST Erik Wienhold <e...@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
From b23bd267ac9c4e79efb472c08dc35737bc8e9ca6 Mon Sep 17 00:00:00 2001
From: Erik Wienhold <e...@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.sgml
index 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 via email to