Why can't you define a table alias on an update?

Поиск
Список
Период
Сортировка
От nolan@celery.tssi.com
Тема Why can't you define a table alias on an update?
Дата
Msg-id 20030615220850.24943.qmail@celery.tssi.com
обсуждение исходный текст
Ответы Re: Why can't you define a table alias on an update?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
This is the query I posted a performance question on, but I have a
SQL standard question about it too:

   update missing_ids
   set mtransts = a.mtransts,
   mtranmemtp = a.mtranmemtp
   from memtran as a
   where a.mtranmemid = missing_ids.mtranmemid
   and a.mtranseq = missing_ids.mtranseq

Why can't you define an alias on the primary table in an update query?

That would make the where clause in the above a bit easier to write
and read, since both the primary table and the table it is being updated
from have the same column names.
--
Mike Nolan




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

Предыдущее
От: nolan@celery.tssi.com
Дата:
Сообщение: Optimizer failure on update w/integer column
Следующее
От: Ernest E Vogelsinger
Дата:
Сообщение: RE : full featured alter table?