Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit86182b1

Browse files
committed
Doc: call out UPDATE syntax change as a v10 compatibility issue.
The change made by commit906bfca means that if you're writinga parenthesized column list in UPDATE ... SET, but that column listis only one column, you now need to write ROW(expression) on therighthand side, not just a parenthesized expression. This was anintentional change for spec compatibility and potential futureexpansion of the possibilities for the RHS, but I'd neglected todocument it as a compatibility issue, figuring that hardly anyonewould 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 sectionand point out the behavior change for a single target column.Discussion:https://postgr.es/m/CAMjNa7cDLzPcs0xnRpkvqmJ6Vb6G3EH8CYGp9ZBjXdpFfTz6dg@mail.gmail.com
1 parentbe72b9c commit86182b1

File tree

1 file changed

+26
-20
lines changed

1 file changed

+26
-20
lines changed

‎doc/src/sgml/release-10.sgml

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,32 @@
157157

158158
<listitem>
159159
<!--
160+
2016-11-22 [906bfcad7] Improve handling of "UPDATE ... SET (column_list) = row_
161+
-->
162+
<para>
163+
Use standard row constructor syntax in <literal>UPDATE ... SET
164+
(<replaceable>column_list</replaceable>) = <replaceable>row_constructor</replaceable></literal>
165+
(Tom Lane)
166+
</para>
167+
168+
<para>
169+
The <replaceable>row_constructor</replaceable> can now begin with the
170+
keyword <literal>ROW</literal>; previously that had to be omitted.
171+
If just one column name appears in
172+
the <replaceable>column_list</replaceable>, then
173+
the <replaceable>row_constructor</replaceable> now must use
174+
the <literal>ROW</literal> keyword, since otherwise it is not a valid
175+
row constructor but just a parenthesized expression.
176+
Also, an occurrence
177+
of <literal><replaceable>table_name</replaceable>.*</literal> within
178+
the <replaceable>row_constructor</replaceable> is now expanded into
179+
multiple columns, as occurs in other uses
180+
of <replaceable>row_constructor</replaceable>s.
181+
</para>
182+
</listitem>
183+
184+
<listitem>
185+
<!--
160186
2017-08-04 [c30f1770a] Apply ALTER ... SET NOT NULL recursively in ALTER ... AD
161187
-->
162188
<para>
@@ -1538,26 +1564,6 @@
15381564

15391565
<listitem>
15401566
<!--
1541-
2016-11-22 [906bfcad7] Improve handling of "UPDATE ... SET (column_list) = row_
1542-
-->
1543-
<para>
1544-
Allow standard row constructor syntax in <literal>UPDATE ... SET
1545-
(<replaceable>column_list</replaceable>) = <replaceable>row_constructor</replaceable></literal>
1546-
(Tom Lane)
1547-
</para>
1548-
1549-
<para>
1550-
The <replaceable>row_constructor</replaceable> can now begin with the
1551-
keyword <literal>ROW</literal>; previously that had to be omitted. Also,
1552-
an occurrence of <literal><replaceable>table_name</replaceable>.*</literal>
1553-
within the <replaceable>row_constructor</replaceable> is now expanded into
1554-
multiple columns, as in other uses
1555-
of <replaceable>row_constructor</replaceable>s.
1556-
</para>
1557-
</listitem>
1558-
1559-
<listitem>
1560-
<!--
15611567
2016-09-05 [c54159d44] Make locale-dependent regex character classes work for l
15621568
-->
15631569
<para>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp