FOR UPDATE versus WITH --- change 8.4 too?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема FOR UPDATE versus WITH --- change 8.4 too?
Дата
Msg-id 9482.1256655023@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: FOR UPDATE versus WITH --- change 8.4 too?  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
In yesterday's discussions about FOR UPDATE there was some mention of
making it not propagate into WITH subqueries:
http://archives.postgresql.org/pgsql-hackers/2009-10/msg01540.php
That is, given WITH w AS (SELECT * FROM foo) SELECT * FROM w, bar ... FOR UPDATE
should foo be locked FOR UPDATE or not?  The current behavior is that
the code attempts to propagate FOR UPDATE into the WITH, and fails
(the parser rejects it in some cases, and the planner in others ---
AFAICT there is no case where it actually works).  This is pretty
useless, and it's also at odds with the philosophy we adopted that WITH
queries execute independently of the primary query.  So I think there
was consensus to change it to have FOR UPDATE ignore WITH references.

What I'm wondering at the moment is if there's any objection to
back-patching the change into 8.4.  Given the lack of any way to have a
working query depend on this behavior, it doesn't seem that there could
be a problem, but can anyone think of an objection I missed?
        regards, tom lane


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

Предыдущее
От: Euler Taveira de Oliveira
Дата:
Сообщение: Re: Delete cascade with three levels bug ?
Следующее
От: Euler Taveira de Oliveira
Дата:
Сообщение: Re: per-tablespace random_page_cost/seq_page_cost