pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Invalid statement in ref/insert.sgml
2+ messages / 2 participants
[nested] [flat]

* Invalid statement in ref/insert.sgml
@ 2016-07-08 14:22 Alexander Law <exclusion@gmail.com>
  2016-07-08 16:46 ` Re: Invalid statement in ref/insert.sgml Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Alexander Law @ 2016-07-08 14:22 UTC (permalink / raw)
  To: pgsql-docs; +Cc: andres@anarazel.de

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>
^ permalink raw reply [nested|flat] 2+ messages in thread

* Re: Invalid statement in ref/insert.sgml
  2016-07-08 14:22 Invalid statement in ref/insert.sgml Alexander Law <exclusion@gmail.com>
@ 2016-07-08 16:46 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2016-07-08 16:46 UTC (permalink / raw)
  To: Alexander Law <exclusion@gmail.com>; +Cc: pgsql-docs; andres@anarazel.de

Alexander Law <exclusion@gmail.com> writes:
> 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.

Pushed, thanks!

			regards, tom lane


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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2016-07-08 16:46 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-07-08 14:22 Invalid statement in ref/insert.sgml Alexander Law <exclusion@gmail.com>
2016-07-08 16:46 ` Tom Lane <tgl@sss.pgh.pa.us>

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