Re: Add Missing From?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Add Missing From?
Дата
Msg-id 29397.1092157302@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Add Missing From?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Add Missing From?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: fsync vs open_sync (more info)