doc: Clarify what "excluded" represents for INSERT ON CONFLICT - Mailing list pgsql-hackers

From David G. Johnston
Subject doc: Clarify what "excluded" represents for INSERT ON CONFLICT
Date
Msg-id CAKFQuwa4J0+WuO7kW1PLbjoEvzPN+Q_j+P2bXxNnCLaszY7ZdQ@mail.gmail.com
Whole thread Raw
Responses Re: doc: Clarify what "excluded" represents for INSERT ON CONFLICT
List pgsql-hackers
Hi,

Reposting this on its own thread.


    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 ambiguous 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.

David J.

Attachment

pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: doc: Clarify Savepoint Behavior
Next
From: "David G. Johnston"
Date:
Subject: Re: doc: Clarify Savepoint Behavior