Re: Allow an alias for the target table in UPDATE/DELETE

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Allow an alias for the target table in UPDATE/DELETE
Дата
Msg-id 43D3D42E.30209@dunslane.net
обсуждение исходный текст
Ответ на Re: Allow an alias for the target table in UPDATE/DELETE  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches

Tom Lane wrote:

>The effect of this, as Andrew says, is that in this particular context
>you can't write SET as an alias unless you write AS first.  This is
>probably not going to surprise anyone in the UPDATE case, since the
>ambiguity inherent in writing
>    UPDATE foo set SET ...
>is pretty obvious.  However it might surprise someone in the DELETE
>context.
>
>

You probably avoid that if you have a separate rule for the DELETE case.
That raises this question: how far do we want to go in unfactoring the
grammar to handle such cases?

cheers

andrew

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

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: TupleDesc refcounting
Следующее
От: Neil Conway
Дата:
Сообщение: Re: Allow an alias for the target table in UPDATE/DELETE