Skip to content

Commit 8ba4ccd

Browse files
committed
Docs: improve examples about not repeating table name in UPDATE ... SET.
Alexander Law
1 parent 262c1b2 commit 8ba4ccd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

doc/src/sgml/ref/insert.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ INSERT INTO <replaceable class="PARAMETER">table_name</replaceable> [ AS <replac
194194
column leaves the other fields null.) When referencing a
195195
column with <literal>ON CONFLICT DO UPDATE</>, do not include
196196
the table's name in the specification of a target column. For
197-
example, <literal>INSERT ... ON CONFLICT DO UPDATE tab SET
198-
table_name.col = 1</> is invalid (this follows the general
197+
example, <literal>INSERT INTO table_name ... ON CONFLICT DO UPDATE
198+
SET table_name.col = 1</> is invalid (this follows the general
199199
behavior for <command>UPDATE</>).
200200
</para>
201201
</listitem>

doc/src/sgml/ref/update.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ UPDATE [ ONLY ] <replaceable class="PARAMETER">table_name</replaceable> [ * ] [
123123
The column name can be qualified with a subfield name or array
124124
subscript, if needed. Do not include the table's name in the
125125
specification of a target column &mdash; for example,
126-
<literal>UPDATE tab SET tab.col = 1</> is invalid.
126+
<literal>UPDATE table_name SET table_name.col = 1</> is invalid.
127127
</para>
128128
</listitem>
129129
</varlistentry>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy