Re: Implementation of UPDATE

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Implementation of UPDATE
Дата
Msg-id 19386.1029869060@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Implementation of UPDATE  (Diogo Biazus <diogo@ikono.com.br>)
Список pgsql-general
Diogo Biazus <diogo@ikono.com.br> writes:
> I was wondering if postgres executes a subquery in an UPDATE clause once
> and use the result (of the subquery) for all the updates.

It should if the subquery is not dependent on any variables of the outer
table.  To tell, run EXPLAIN on the query and look to see if you see
"InitPlan" (done once) or "SubPlan" (done each time result is needed).

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Off-topic: a round of applause for Marc
Следующее
От: Lamar Owen
Дата:
Сообщение: Re: Off-topic: a round of applause for Marc