Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jK7S2-00017a-Gf for pgsql-committers@arkaria.postgresql.org; Thu, 02 Apr 2020 21:32:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jK7S1-0001Cg-AN for pgsql-committers@arkaria.postgresql.org; Thu, 02 Apr 2020 21:32:37 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jK7S1-0001CY-4u for pgsql-committers@lists.postgresql.org; Thu, 02 Apr 2020 21:32:37 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jK7Ry-0003qV-CH for pgsql-committers@lists.postgresql.org; Thu, 02 Apr 2020 21:32:35 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1jK7Rx-0005LQ-PY; Thu, 02 Apr 2020 17:32:33 -0400 Date: Thu, 2 Apr 2020 17:32:33 -0400 From: Bruce Momjian To: Peter Eisentraut Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: doc: adjust UPDATE/DELETE's FROM/USING to match SELECT's FROM Message-ID: <20200402213233.GC7251@momjian.us> References: <370f1993-7c3b-88a0-4836-6fe86d550684@2ndquadrant.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <370f1993-7c3b-88a0-4836-6fe86d550684@2ndquadrant.com> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Apr 2, 2020 at 07:32:49AM +0200, Peter Eisentraut wrote: > On 2020-03-31 22:31, Bruce Momjian wrote: > > doc: adjust UPDATE/DELETE's FROM/USING to match SELECT's FROM > > > > Previously the syntax and wording were unclear. > > @@ -23,7 +23,7 @@ PostgreSQL documentation > > [ WITH [ RECURSIVE ] class="parameter">with_query [, ...] ] > DELETE FROM [ ONLY ] class="PARAMETER">table_name [ * ] [ [ AS ] class="parameter">alias ] > - [ USING using_list ] > + [ USING from_item [, ...] > ] > [ WHERE condition | WHERE > CURRENT OF cursor_name ] > [ RETURNING * | class="parameter">output_expression [ [ AS ] class="parameter">output_name ] [, ...] ] > > > This change doesn't make sense. It is clearly a "using list" in the case of > DELETE. Trying to unify it with UPDATE is wrong because the syntax is in > fact different. This message from Tom requested the use of "from_list": https://www.postgresql.org/message-id/7354.1584500334%40sss.pgh.pa.us I think that the DELETE synopsis should look like [ USING from_item [, ...] ] so that there's not any question which part of the SELECT syntax we're talking about. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +