pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Law <exclusion@gmail.com>
To: pgsql-docs@postgresql.org
Cc: andres@anarazel.de
Subject: Invalid statement in ref/insert.sgml
Date: Fri, 8 Jul 2016 17:22:39 +0300
Message-ID: <577FB72F.4040900@gmail.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-docs>

Hello,

It seems, that the statement "INSERT ... ON CONFLICT DO UPDATE tab SET 
table_name.col = 1" is invalid in two ways. Patch attached.
Maybe it's worth to replace "UPDATE tab SET tab.col = 1" with "UPDATE 
table_name SET table_name.col = 1" in ref/update.sgml (for consistency) too.

Best regards,
Alexander

-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs

Attachments:

ref-insert-fix-example.sgml (text/sgml, 845B) download diff --git a/doc/src/sgml/ref/insert.sgml b/doc/src/sgml/ref/insert.sgml index e710cf4..0406a09 100644 --- a/doc/src/sgml/ref/insert.sgml +++ b/doc/src/sgml/ref/insert.sgml @@ -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>
ref-update-better-example.sgml (text/sgml, 653B) download diff --git a/doc/src/sgml/ref/update.sgml b/doc/src/sgml/ref/update.sgml index 35b0699..c50434f 100644 --- a/doc/src/sgml/ref/update.sgml +++ b/doc/src/sgml/ref/update.sgml @@ -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>

view thread (2+ messages)  latest in thread

Message-ID: <577FB72F.4040900@gmail.com>
Permalink:  ../577FB72F.4040900@gmail.com/
Also on:    postgresql.org/message-id/577FB72F.4040900@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: exclusion@gmail.com, andres@anarazel.de
  Subject: Re: Invalid statement in ref/insert.sgml
  In-Reply-To: <577FB72F.4040900@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox