From 7becb5fa1d8760ee70258ff23ce229ce5451c597 Mon Sep 17 00:00:00 2001
From: Tom Lane <tgl@sss.pgh.pa.us>
Date: Mon, 30 Oct 2017 16:44:26 -0400
Subject: [PATCH] Doc: call out UPDATE syntax change as a v10 compatibility
 issue.

The change made by commit 906bfcad7 means that if you're writing
a parenthesized column list in UPDATE ... SET, but that column list
is only one column, you now need to write ROW(expression) on the
righthand side, not just a parenthesized expression.  This was an
intentional change for spec compatibility and potential future
expansion of the possibilities for the RHS, but I'd neglected to
document it as a compatibility issue, figuring that hardly anyone
would bother with parenthesized syntax for a single target column.
I was wrong, as shown by questions from Justin Pryzby, Adam Brusselback,
and others.  Move the release note item into the compatibility section
and point out the behavior change for a single target column.

Discussion: https://postgr.es/m/CAMjNa7cDLzPcs0xnRpkvqmJ6Vb6G3EH8CYGp9ZBjXdpFfTz6dg@mail.gmail.com
---
 doc/src/sgml/release-10.sgml | 46 ++++++++++++++++++++----------------
 1 file changed, 26 insertions(+), 20 deletions(-)

diff --git a/doc/src/sgml/release-10.sgml b/doc/src/sgml/release-10.sgml
index 98149db3352..6b5c3a02a90 100644
--- a/doc/src/sgml/release-10.sgml
+++ b/doc/src/sgml/release-10.sgml
@@ -157,6 +157,32 @@
 
     <listitem>
 <!--
+2016-11-22 [906bfcad7] Improve handling of "UPDATE ... SET (column_list) = row_
+-->
+     <para>
+      Use standard row constructor syntax in <literal>UPDATE ... SET
+      (<replaceable>column_list</replaceable>) = <replaceable>row_constructor</replaceable></literal>
+      (Tom Lane)
+     </para>
+
+     <para>
+      The <replaceable>row_constructor</replaceable> can now begin with the
+      keyword <literal>ROW</literal>; previously that had to be omitted.
+      If just one column name appears in
+      the <replaceable>column_list</replaceable>, then
+      the <replaceable>row_constructor</replaceable> now must use
+      the <literal>ROW</literal> keyword, since otherwise it is not a valid
+      row constructor but just a parenthesized expression.
+      Also, an occurrence
+      of <literal><replaceable>table_name</replaceable>.*</literal> within
+      the <replaceable>row_constructor</replaceable> is now expanded into
+      multiple columns, as occurs in other uses
+      of <replaceable>row_constructor</replaceable>s.
+     </para>
+    </listitem>
+
+    <listitem>
+<!--
 2017-08-04 [c30f1770a] Apply ALTER ... SET NOT NULL recursively in ALTER ... AD
 -->
      <para>
@@ -1538,26 +1564,6 @@
 
      <listitem>
 <!--
-2016-11-22 [906bfcad7] Improve handling of "UPDATE ... SET (column_list) = row_
--->
-      <para>
-       Allow standard row constructor syntax in <literal>UPDATE ... SET
-       (<replaceable>column_list</replaceable>) = <replaceable>row_constructor</replaceable></literal>
-       (Tom Lane)
-      </para>
-
-      <para>
-       The <replaceable>row_constructor</replaceable> can now begin with the
-       keyword <literal>ROW</literal>; previously that had to be omitted.  Also,
-       an occurrence of <literal><replaceable>table_name</replaceable>.*</literal>
-       within the <replaceable>row_constructor</replaceable> is now expanded into
-       multiple columns, as in other uses
-       of <replaceable>row_constructor</replaceable>s.
-      </para>
-     </listitem>
-
-     <listitem>
-<!--
 2016-09-05 [c54159d44] Make locale-dependent regex character classes work for l
 -->
       <para>
-- 
GitLab