Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3ba9639

Browse files
committed
doc: Updates for RETURNING OLD/NEW.
Fix a couple of sentences in the documentation that were missed in commit 80feb72. Author: Dean Rasheed <[email protected]> Reviewed-by: Robert Treat <[email protected]> Discussion: https://postgr.es/m/CAEZATCUcqADJuapZSjPf2b6hFJ6AGOUwefRvh8Ht3UZoqqw69Q@mail.gmail.com
1 parent eca624c commit 3ba9639

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

doc/src/sgml/ref/merge.sgml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,11 @@ MERGE INTO [ ONLY ] <replaceable class="parameter">target_table_name</replaceabl
106106
to compute and return value(s) based on each row inserted, updated, or
107107
deleted. Any expression using the source or target table's columns, or
108108
the <link linkend="merge-action"><function>merge_action()</function></link>
109-
function can be computed. When an <command>INSERT</command> or
109+
function can be computed. By default, when an <command>INSERT</command> or
110110
<command>UPDATE</command> action is performed, the new values of the target
111-
table's columns are used. When a <command>DELETE</command> is performed,
112-
the old values of the target table's columns are used. The syntax of the
111+
table's columns are used, and when a <command>DELETE</command> is performed,
112+
the old values of the target table's columns are used, but it is also
113+
possible to explicitly request old and new values. The syntax of the
113114
<literal>RETURNING</literal> list is identical to that of the output list
114115
of <command>SELECT</command>.
115116
</para>

doc/src/sgml/ref/update.sgml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ UPDATE [ ONLY ] <replaceable class="parameter">table_name</replaceable> [ * ] [
5757
to compute and return value(s) based on each row actually updated.
5858
Any expression using the table's columns, and/or columns of other
5959
tables mentioned in <literal>FROM</literal>, can be computed.
60-
The new (post-update) values of the table's columns are used.
60+
By default, the new (post-update) values of the table's columns are used,
61+
but it is also possible to request the old (pre-update) values.
6162
The syntax of the <literal>RETURNING</literal> list is identical to that of the
6263
output list of <command>SELECT</command>.
6364
</para>

0 commit comments

Comments
 (0)