mirror of
https://github.com/postgres/postgres.git
synced 2025-04-21 12:05:57 +03:00
Doc: fix syntax synopsis for INSERT ... ON CONFLICT DO UPDATE.
Commit 906bfcad7 adjusted the syntax synopsis for UPDATE, but missed the fact that the INSERT synopsis now contains a duplicate of that. In passing, improve wording and markup about using a table alias to dodge the conflict with use of "excluded" as a special table name.
This commit is contained in:
parent
a5d4e3ff79
commit
2b18743614
@ -36,7 +36,7 @@ INSERT INTO <replaceable class="PARAMETER">table_name</replaceable> [ AS <replac
|
|||||||
|
|
||||||
DO NOTHING
|
DO NOTHING
|
||||||
DO UPDATE SET { <replaceable class="PARAMETER">column_name</replaceable> = { <replaceable class="PARAMETER">expression</replaceable> | DEFAULT } |
|
DO UPDATE SET { <replaceable class="PARAMETER">column_name</replaceable> = { <replaceable class="PARAMETER">expression</replaceable> | DEFAULT } |
|
||||||
( <replaceable class="PARAMETER">column_name</replaceable> [, ...] ) = ( { <replaceable class="PARAMETER">expression</replaceable> | DEFAULT } [, ...] ) |
|
( <replaceable class="PARAMETER">column_name</replaceable> [, ...] ) = [ ROW ] ( { <replaceable class="PARAMETER">expression</replaceable> | DEFAULT } [, ...] ) |
|
||||||
( <replaceable class="PARAMETER">column_name</replaceable> [, ...] ) = ( <replaceable class="PARAMETER">sub-SELECT</replaceable> )
|
( <replaceable class="PARAMETER">column_name</replaceable> [, ...] ) = ( <replaceable class="PARAMETER">sub-SELECT</replaceable> )
|
||||||
} [, ...]
|
} [, ...]
|
||||||
[ WHERE <replaceable class="PARAMETER">condition</replaceable> ]
|
[ WHERE <replaceable class="PARAMETER">condition</replaceable> ]
|
||||||
@ -174,9 +174,9 @@ INSERT INTO <replaceable class="PARAMETER">table_name</replaceable> [ AS <replac
|
|||||||
A substitute name for <replaceable
|
A substitute name for <replaceable
|
||||||
class="PARAMETER">table_name</replaceable>. When an alias is
|
class="PARAMETER">table_name</replaceable>. When an alias is
|
||||||
provided, it completely hides the actual name of the table.
|
provided, it completely hides the actual name of the table.
|
||||||
This is particularly useful when <literal>ON CONFLICT DO
|
This is particularly useful when <literal>ON CONFLICT DO UPDATE</>
|
||||||
UPDATE</literal> targets a table named excluded, since that's
|
targets a table named <varname>excluded</>, since that will otherwise
|
||||||
also the name of the special table representing rows proposed
|
be taken as the name of the special table representing rows proposed
|
||||||
for insertion.
|
for insertion.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user