aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2017-10-30 16:44:26 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2017-10-30 16:44:26 -0400
commit86182b18957b8f9e8045d55b137aeef7c9af9916 (patch)
tree8cc03285e61d5c9ddc616e1eeeb85362ca75635f
parentbe72b9c378bfe99a3d175c98d36dc150229f4faf (diff)
downloadpostgresql-86182b18957b8f9e8045d55b137aeef7c9af9916.tar.gz
postgresql-86182b18957b8f9e8045d55b137aeef7c9af9916.zip
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
-rw-r--r--doc/src/sgml/release-10.sgml46
1 files changed, 26 insertions, 20 deletions
diff --git a/doc/src/sgml/release-10.sgml b/doc/src/sgml/release-10.sgml
index d37f700055c..906b3814f7b 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>