Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Tom Lane wrote:
>> This description confuses two quite separate issues.
> Yea, it does.
> How is this text:
> * Allow DELETE to handle table aliases for self-joins
> 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.
Not a lot better. They really should be two separate issues, because we
could in theory do either without the other.
* Allow an alias to be provided for the target table in UPDATE/DELETE
This is not SQL-spec but many DBMSs allow it.
* Allow additional tables to be specified in DELETE for joining
UPDATE already allows this (UPDATE...FROM) and we need a similarability in DELETE. It's been agreed that the keyword
shouldbeUSING, to avoid anything so confusing as DELETE FROM a FROM b.
I have not looked to see whether or not there are already entries
similar to these.
regards, tom lane