On Thu, 16 Jan 2025 at 15:28, Dean Rasheed <dean.a.rash...@gmail.com> wrote:
>
> I went over this again in detail and didn't find any problems, so I
> have committed it. Thanks for all the review comments.
>

Looking at the doc pages for UPDATE and MERGE, I realise that I missed
a paragraph in the "Description" section that needs updating.

Patch attached.

Regards,
Dean
diff --git a/doc/src/sgml/ref/merge.sgml b/doc/src/sgml/ref/merge.sgml
new file mode 100644
index ecbcd83..e3d9ca6
--- a/doc/src/sgml/ref/merge.sgml
+++ b/doc/src/sgml/ref/merge.sgml
@@ -106,10 +106,11 @@ DELETE
    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
    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
-   table's columns are used.  When a <command>DELETE</command> is performed,
-   the old values of the target table's columns are used.  The syntax of the
+   table's columns are used, and when a <command>DELETE</command> is performed,
+   the old values of the target table's columns are used, but is it also
+   possible to explicity request old and new values.  The syntax of the
    <literal>RETURNING</literal> list is identical to that of the output list
    of <command>SELECT</command>.
   </para>
diff --git a/doc/src/sgml/ref/update.sgml b/doc/src/sgml/ref/update.sgml
new file mode 100644
index 12ec5ba..40cca06
--- a/doc/src/sgml/ref/update.sgml
+++ b/doc/src/sgml/ref/update.sgml
@@ -57,7 +57,8 @@ UPDATE [ ONLY ] <replaceable class="para
    to compute and return value(s) based on each row actually updated.
    Any expression using the table's columns, and/or columns of other
    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
    output list of <command>SELECT</command>.
   </para>

Reply via email to