Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Docs: improve examples about not repeating table name in UPDATE ... SET.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 8 Jul 2016 16:46:04 +0000 (12:46 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 8 Jul 2016 16:46:12 +0000 (12:46 -0400)
Alexander Law

doc/src/sgml/ref/insert.sgml
doc/src/sgml/ref/update.sgml

index e710cf4091b8a46e03d269b69c1ce3b3c5ea0a05..0406a097f55b0e3e0fff9f3012f1c690a5812897 100644 (file)
@@ -194,8 +194,8 @@ INSERT INTO <replaceable class="PARAMETER">table_name</replaceable> [ AS <replac
         column leaves the other fields null.)  When referencing a
         column with <literal>ON CONFLICT DO UPDATE</>, do not include
         the table's name in the specification of a target column.  For
-        example, <literal>INSERT ... ON CONFLICT DO UPDATE tab SET
-        table_name.col = 1</> is invalid (this follows the general
+        example, <literal>INSERT INTO table_name ... ON CONFLICT DO UPDATE
+        SET table_name.col = 1</> is invalid (this follows the general
         behavior for <command>UPDATE</>).
        </para>
       </listitem>
index 35b0699f0862d0024c44f99828a5ab09cce6a4cc..c50434f85f98f0c7b74dc2831f01296914ec8c6d 100644 (file)
@@ -123,7 +123,7 @@ UPDATE [ ONLY ] <replaceable class="PARAMETER">table_name</replaceable> [ * ] [
       The column name can be qualified with a subfield name or array
       subscript, if needed.  Do not include the table's name in the
       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>
     </listitem>
    </varlistentry>