Commit 8ba4ccda authored by Tom Lane's avatar Tom Lane

Docs: improve examples about not repeating table name in UPDATE ... SET.

Alexander Law
parent 262c1b2e
...@@ -194,8 +194,8 @@ INSERT INTO <replaceable class="PARAMETER">table_name</replaceable> [ AS <replac ...@@ -194,8 +194,8 @@ INSERT INTO <replaceable class="PARAMETER">table_name</replaceable> [ AS <replac
column leaves the other fields null.) When referencing a column leaves the other fields null.) When referencing a
column with <literal>ON CONFLICT DO UPDATE</>, do not include column with <literal>ON CONFLICT DO UPDATE</>, do not include
the table's name in the specification of a target column. For the table's name in the specification of a target column. For
example, <literal>INSERT ... ON CONFLICT DO UPDATE tab SET example, <literal>INSERT INTO table_name ... ON CONFLICT DO UPDATE
table_name.col = 1</> is invalid (this follows the general SET table_name.col = 1</> is invalid (this follows the general
behavior for <command>UPDATE</>). behavior for <command>UPDATE</>).
</para> </para>
</listitem> </listitem>
......
...@@ -123,7 +123,7 @@ UPDATE [ ONLY ] <replaceable class="PARAMETER">table_name</replaceable> [ * ] [ ...@@ -123,7 +123,7 @@ UPDATE [ ONLY ] <replaceable class="PARAMETER">table_name</replaceable> [ * ] [
The column name can be qualified with a subfield name or array The column name can be qualified with a subfield name or array
subscript, if needed. Do not include the table's name in the subscript, if needed. Do not include the table's name in the
specification of a target column &mdash; for example, specification of a target column &mdash; for example,
<literal>UPDATE tab SET tab.col = 1</> is invalid. <literal>UPDATE table_name SET table_name.col = 1</> is invalid.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment