Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLWgU-0002SY-MG for pgsql-docs@arkaria.postgresql.org; Fri, 08 Jul 2016 14:23:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bLWgT-0007Ae-IR for pgsql-docs@arkaria.postgresql.org; Fri, 08 Jul 2016 14:23:13 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bLWg5-0006mK-V7 for pgsql-docs@postgresql.org; Fri, 08 Jul 2016 14:22:51 +0000 Received: from mail-lf0-x244.google.com ([2a00:1450:4010:c07::244]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bLWfz-0000AA-MH for pgsql-docs@postgresql.org; Fri, 08 Jul 2016 14:22:45 +0000 Received: by mail-lf0-x244.google.com with SMTP id a10so5579712lfb.1 for ; Fri, 08 Jul 2016 07:22:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=to:cc:from:subject:message-id:date:user-agent:mime-version; bh=4/FxHJs6zlieJeUu3rOa+GnjpRLQyseSNKQFt43ooIA=; b=JSWMh7L0ccTfChjDPsPXaFandFmPyU/Xa4Y2yYGpeC5UMtJ/JwinZxm9A3Q6dzLxmR DM0swj2/moaXzbkZ4DVW+cDg2VbGd4mZ7VFLKcs7HNiFtU4rkr/JuEQ5tRLMT/5s/2se O2WvF6pTrl0zhika0TMo1thVR9ma1gji5n3+zvdvSgr+HiYv2v9u7B1gxxv0YqwyHre4 03Do3Y5rZ5sBwo4r5pMPyoEnE4Ls+vONw8cEMgSlwy28k8PM44FspftmGV74V22ejone onOoDWNJzsSrZSQ/u2zca8db/U2Y99rLZgvUPuUh9X9k0kiCo5a///pdXbhC400qz9GN ThaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:cc:from:subject:message-id:date:user-agent :mime-version; bh=4/FxHJs6zlieJeUu3rOa+GnjpRLQyseSNKQFt43ooIA=; b=TE8ICu+fMv5lQ3sVDEYW9qIf+GaY45puaVCqft25JdmQ769fafUZ5EDFPuV6xFr0SK CuxI0W1VnKBDtny7ggiLH8rGQ6d0Dx2HHXjophonKCZVBmHzzaoor95om3ZKIOtHGTDw bKHhhkIXTh9XNYhWcdV9nwSYAiR3AZGT9l2kRl0Yz6SZG8XVeu06lSyi0Ox59ynIwBLs vT1/p4XQGmEsAjDZI0+nSk2hyU5bG2TxEaOdxtUtnSKcaM5Eo4wQA3g0hDRNvLAb4HAd VRlyPnLce0cDqYx54RY5ZdCz81Bg0Mh/IbNZIpmNgxEvQ63ehwuNtH9YiDT7WVYhq0hA s7Eg== X-Gm-Message-State: ALyK8tKEiKQwbiNspkJs2o2gB4elm/6QHu3jNaU+bQxowcg+rflHQb9zXHACiSxFmurXrQ== X-Received: by 10.25.149.6 with SMTP id x6mr1379554lfd.106.1467987761321; Fri, 08 Jul 2016 07:22:41 -0700 (PDT) Received: from [1.0.0.7] ([109.196.196.155]) by smtp.gmail.com with ESMTPSA id f66sm3138805lfe.4.2016.07.08.07.22.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Jul 2016 07:22:40 -0700 (PDT) To: pgsql-docs@postgresql.org Cc: andres@anarazel.de From: Alexander Law Subject: Invalid statement in ref/insert.sgml Message-ID: <577FB72F.4040900@gmail.com> Date: Fri, 8 Jul 2016 17:22:39 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030203030905050004010100" X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org This is a multi-part message in MIME format. --------------030203030905050004010100 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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 --------------030203030905050004010100 Content-Type: text/sgml; name="ref-insert-fix-example.sgml" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ref-insert-fix-example.sgml" 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 table_name [ AS ON CONFLICT DO UPDATE, do not include the table's name in the specification of a target column. For - example, INSERT ... ON CONFLICT DO UPDATE tab SET - table_name.col = 1 is invalid (this follows the general + example, INSERT INTO table_name ... ON CONFLICT DO UPDATE + SET table_name.col = 1 is invalid (this follows the general behavior for UPDATE). --------------030203030905050004010100 Content-Type: text/sgml; name="ref-update-better-example.sgml" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ref-update-better-example.sgml" 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 ] table_name [ * ] [ 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 — for example, - UPDATE tab SET tab.col = 1 is invalid. + UPDATE table_name SET table_name.col = 1 is invalid. --------------030203030905050004010100 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs --------------030203030905050004010100--