Unexpected update behaviour

Поиск
Список
Период
Сортировка
От Victor Yegorov
Тема Unexpected update behaviour
Дата
Msg-id CAGnEboiorcnbvNwNqV+mS1rALG9DjE_SL44bUjOCbx8Lkw_+Rw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Unexpected update behaviour
Список pgsql-general
Greetings.

I've hit a strange issue. This is a simplified setup.
First, run create.sql to get a couple of tables.
Then, run the update query.

Tested on 9.2.6 and 9.3.2.

Now:
- if I remove the UNION ALL part of the inner query, UPDATE works;
- if I move the `raw` subquery into the CTE, UPDATE works (but takes
  hours on my full data);
- if I convert this UPDATE into a SELECT, I get the row to be updated.

Could you kindly explain me why the query as it is updates no records?


--
Victor Y. Yegorov
Вложения

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

Предыдущее
От: Kevin Grittner
Дата:
Сообщение: Re: Grouping, Aggregate, Min, Max
Следующее
От: Roy Anderson
Дата:
Сообщение: Data Guard for Postgres?