Re: Are identical subqueries in unioned statements nonrepeatable?

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Are identical subqueries in unioned statements nonrepeatable?
Дата
Msg-id 1279823866-sup-7923@alvh.no-ip.org
обсуждение исходный текст
Ответ на Are identical subqueries in unioned statements nonrepeatable?  (Derrick Rice <derrick.rice@gmail.com>)
Список pgsql-general
Excerpts from Derrick Rice's message of jue jul 22 12:27:31 -0400 2010:

> Is it possible for the contents of reference_table to differ from the first
> select to the select on the right hand side of the union?  (e.g. because
> some other transaction committed additional rows).

No.

> If it is not possible, why?  Is it because a single query always executes
> with serializable (effective) isolation?

Yes.  (Actually: it's because a query is always executed with a single
snapshot).

> Is it because postgresql
> recognizes that the query is repeated and uses a single result set in both
> sides of the union?

No.

> Is this behavior that is part of postgresql intentionally, or a side effect
> that I should not rely on?

It is intentional and will not be changed.

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

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: How to improve performance in reporting database?
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Insert and Retrieve unsigned char sequences using C