commit 3ae125aafb5bad062952be1e9f97cb2288350f5b
Author: David G. Johnston <david.g.johnston@gmail.com>
Date:   Tue Apr 12 02:51:18 2022 +0000

    doc: For INSERT ON CONFLICT excluded is a only a name, not a table.
    
    As one cannot place excluded in a FROM clause (subquery) in the
    ON CONFLICT clause referring to it as a table, with plural rows
    nonetheless, leads the reader to infer more about what the
    behavior here is than is correct. We already just say use the
    table's name for the existing row so just match that pattern
    of using the name excluded for the proposed row.
    
    The alias description doesn't have the same issue regarding the
    use of the word table and rows, as the use there is more conceptual,
    but the wording about "otherwise taken as" is wrong: rather two
    labels of excluded end up in scope and you get an ambigious name error.
    
    The error messages still consider excluded to be a table reference
    and this patch does not try to change that.  That implementation
    detail need not force the user-facing documentation for the feature
    to use the term table when it doesn't really apply.

diff --git a/doc/src/sgml/ref/insert.sgml b/doc/src/sgml/ref/insert.sgml
index a9af9959c0..0fad1d3640 100644
--- a/doc/src/sgml/ref/insert.sgml
+++ b/doc/src/sgml/ref/insert.sgml
@@ -175,9 +175,8 @@ INSERT INTO <replaceable class="parameter">table_name</replaceable> [ AS <replac
         class="parameter">table_name</replaceable>.  When an alias is
         provided, it completely hides the actual name of the table.
         This is particularly useful when <literal>ON CONFLICT DO UPDATE</literal>
-        targets a table named <varname>excluded</varname>, since that will otherwise
-        be taken as the name of the special table representing rows proposed
-        for insertion.
+        targets a table named <varname>excluded</varname>, since that will
+        conflict with the special name representing the row proposed for insertion.
        </para>
       </listitem>
      </varlistentry>
@@ -396,8 +395,8 @@ INSERT INTO <replaceable class="parameter">table_name</replaceable> [ AS <replac
         conflict.  The <literal>SET</literal> and
         <literal>WHERE</literal> clauses in <literal>ON CONFLICT DO
         UPDATE</literal> have access to the existing row using the
-        table's name (or an alias), and to rows proposed for insertion
-        using the special <varname>excluded</varname> table.
+        table's name (or an alias), and to the proposed row
+        using the name <varname>excluded</varname>.
         <literal>SELECT</literal> privilege is required on any column in the
         target table where corresponding <varname>excluded</varname>
         columns are read.
@@ -699,8 +698,8 @@ INSERT INTO employees_log SELECT *, current_timestamp FROM upd;
   <para>
    Insert or update new distributors as appropriate.  Assumes a unique
    index has been defined that constrains values appearing in the
-   <literal>did</literal> column.  Note that the special
-   <varname>excluded</varname> table is used to reference values originally
+   <literal>did</literal> column.  Note that the name
+   <varname>excluded</varname> is used to reference values originally
    proposed for insertion:
 <programlisting>
 INSERT INTO distributors (did, dname)
