Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit f7667e4

Browse files
committed
Update DELETE FROM:
< * Allow DELETE to handle table aliases for self-joins > * Allow an alias to be provided for the target table in UPDATE/DELETE 276,279c276,282 < There is no way to create a table alias for the deleted table for use < in the DELETE WHERE clause. The agreed approach is to allow a USING < clause to specify additional tables. UPDATE already has an optional < FROM clause for this purpose. > This is not SQL-spec but many DBMSs allow it. > > * Allow additional tables to be specified in DELETE for joins > > UPDATE already allows this (UPDATE...FROM) but we need similar > functionality in DELETE. It's been agreed that the keyword should > be USING, to avoid anything as confusing as DELETE FROM a FROM b.
1 parent 2c29664 commit f7667e4

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

doc/TODO

+9-6
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ TODO list for PostgreSQL
55
Bracketed items "[]" have more detail.
66

77
Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
8-
Last updated: Tue Aug 10 11:00:16 EDT 2004
8+
Last updated: Tue Aug 10 13:30:30 EDT 2004
99

1010
The most recent version of this document can be viewed at the PostgreSQL web site, http://www.PostgreSQL.org.
1111

@@ -271,12 +271,15 @@ Commands
271271
The use of C-style backslashes (.e.g. \n, \r) in quoted strings is not
272272
SQL-spec compliant, so allow such handling to be disabled.
273273

274-
* Allow DELETE to handle table aliases for self-joins
274+
* Allow an alias to be provided for the target table in UPDATE/DELETE
275275

276-
There is no way to create a table alias for the deleted table for use
277-
in the DELETE WHERE clause. The agreed approach is to allow a USING
278-
clause to specify additional tables. UPDATE already has an optional
279-
FROM clause for this purpose.
276+
This is not SQL-spec but many DBMSs allow it.
277+
278+
* Allow additional tables to be specified in DELETE for joins
279+
280+
UPDATE already allows this (UPDATE...FROM) but we need similar
281+
functionality in DELETE. It's been agreed that the keyword should
282+
be USING, to avoid anything as confusing as DELETE FROM a FROM b.
280283

281284
* Add CORRESPONDING BY to UNION/INTERSECT/EXCEPT
282285
* Allow REINDEX to rebuild all database indexes, remove /contrib/reindex

0 commit comments

Comments
 (0)