pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: doc: adjust UPDATE/DELETE's FROM/USING to match SELECT's FROM
Date: Thu, 2 Apr 2020 17:32:33 -0400
Message-ID: <20200402213233.GC7251@momjian.us> (raw)
In-Reply-To: <370f1993-7c3b-88a0-4836-6fe86d550684@2ndquadrant.com>
References: <E1jJNY8-0004FI-6J@gemulon.postgresql.org>
	<370f1993-7c3b-88a0-4836-6fe86d550684@2ndquadrant.com>

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
>  <synopsis>
>  [ WITH [ RECURSIVE ] <replaceable
> class="parameter">with_query</replaceable> [, ...] ]
>  DELETE FROM [ ONLY ] <replaceable
> class="PARAMETER">table_name</replaceable> [ * ] [ [ AS ] <replaceable
> class="parameter">alias</replaceable> ]
> -    [ USING <replaceable class="PARAMETER">using_list</replaceable> ]
> +    [ USING <replaceable class="parameter">from_item</replaceable> [, ...]
> ]
>      [ WHERE <replaceable class="PARAMETER">condition</replaceable> | WHERE
> CURRENT OF <replaceable class="PARAMETER">cursor_name</replaceable> ]
>      [ RETURNING * | <replaceable
> class="parameter">output_expression</replaceable> [ [ AS ] <replaceable
> class="parameter">output_name</replaceable> ] [, ...] ]
>  </synopsis>
> 
> 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 <replaceable class="parameter">from_item</replaceable> [, ...] ]
	
	
	so that there's not any question which part of the SELECT syntax we're
	talking about. 

-- 
  Bruce Momjian  <bruce@momjian.us>        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 +





view thread (8+ messages)

Message-ID: <20200402213233.GC7251@momjian.us>
Permalink:  ../20200402213233.GC7251@momjian.us/
Also on:    postgresql.org/message-id/20200402213233.GC7251@momjian.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: bruce@momjian.us, peter.eisentraut@2ndquadrant.com
  Subject: Re: pgsql: doc: adjust UPDATE/DELETE's FROM/USING to match SELECT's FROM
  In-Reply-To: <20200402213233.GC7251@momjian.us>
  References: <E1jJNY8-0004FI-6J@gemulon.postgresql.org> <370f1993-7c3b-88a0-4836-6fe86d550684@2ndquadrant.com> <20200402213233.GC7251@momjian.us>

* 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