pgsql: doc: adjust UPDATE/DELETE's FROM/USING to match SELECT's FROM
pgsql: doc: adjust UPDATE/DELETE's FROM/USING to match SELECT's FROM
От:
Bruce Momjian <bruce@momjian.us>
Дата:
doc: adjust UPDATE/DELETE's FROM/USING to match SELECT's FROM Previously the syntax and wording were unclear. Reported-by: Alexey Bashtanov Discussion: https://postgr.es/m/968d4724-8e58-788f-7c45-f7b1813824cc@imap.cc Backpatch-through: 9.5 Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/b8c651b75b2133d843b4fbbd52254b55792339cd Modified Files -------------- doc/src/sgml/ref/delete.sgml | 20 ++++++++++---------- doc/src/sgml/ref/update.sgml | 22 +++++++++++----------- 2 files changed, 21 insertions(+), 21 deletions(-)
Re: pgsql: doc: adjust UPDATE/DELETE's FROM/USING to match SELECT'sFROM
От:
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Дата:
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 ] with_query [, ...] ]
DELETE FROM [ ONLY ] table_name [ * ] [ [ AS ] alias ]
- [ USING using_list ]
+ [ USING from_item [,
...] ]
[ WHERE condition |
WHERE CURRENT OF cursor_name ]
[ RETURNING * | output_expression [ [ AS ] 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.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Re: pgsql: doc: adjust UPDATE/DELETE's FROM/USING to match SELECT'sFROM
От:
Bruce Momjian <bruce@momjian.us>
Дата:
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 +