1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

doc: Updates for RETURNING OLD/NEW.

Fix a couple of sentences in the documentation that were missed in
commit 80feb727c8.

Author: Dean Rasheed <dean.a.rasheed@gmail.com>
Reviewed-by: Robert Treat <rob@xzilla.net>
Discussion: https://postgr.es/m/CAEZATCUcqADJuapZSjPf2b6hFJ6AGOUwefRvh8Ht3UZoqqw69Q@mail.gmail.com
This commit is contained in:
Dean Rasheed
2025-06-26 10:13:00 +01:00
parent eca624c659
commit 3ba9639e39
2 changed files with 6 additions and 4 deletions

View File

@ -106,10 +106,11 @@ MERGE INTO [ ONLY ] <replaceable class="parameter">target_table_name</replaceabl
to compute and return value(s) based on each row inserted, updated, or to compute and return value(s) based on each row inserted, updated, or
deleted. Any expression using the source or target table's columns, or deleted. Any expression using the source or target table's columns, or
the <link linkend="merge-action"><function>merge_action()</function></link> the <link linkend="merge-action"><function>merge_action()</function></link>
function can be computed. When an <command>INSERT</command> or function can be computed. By default, when an <command>INSERT</command> or
<command>UPDATE</command> action is performed, the new values of the target <command>UPDATE</command> action is performed, the new values of the target
table's columns are used. When a <command>DELETE</command> is performed, table's columns are used, and when a <command>DELETE</command> is performed,
the old values of the target table's columns are used. The syntax of the the old values of the target table's columns are used, but it is also
possible to explicitly request old and new values. The syntax of the
<literal>RETURNING</literal> list is identical to that of the output list <literal>RETURNING</literal> list is identical to that of the output list
of <command>SELECT</command>. of <command>SELECT</command>.
</para> </para>

View File

@ -57,7 +57,8 @@ UPDATE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] [
to compute and return value(s) based on each row actually updated. to compute and return value(s) based on each row actually updated.
Any expression using the table's columns, and/or columns of other Any expression using the table's columns, and/or columns of other
tables mentioned in <literal>FROM</literal>, can be computed. tables mentioned in <literal>FROM</literal>, can be computed.
The new (post-update) values of the table's columns are used. By default, the new (post-update) values of the table's columns are used,
but it is also possible to request the old (pre-update) values.
The syntax of the <literal>RETURNING</literal> list is identical to that of the The syntax of the <literal>RETURNING</literal> list is identical to that of the
output list of <command>SELECT</command>. output list of <command>SELECT</command>.
</para> </para>