Re: Read Committed Transaction Isolation and SELECT ... UNION ... SELECT

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Read Committed Transaction Isolation and SELECT ... UNION ... SELECT
Дата
Msg-id 20519.1281480409@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Read Committed Transaction Isolation and SELECT ... UNION ... SELECT  (Eric Ridge <eebbrr@gmail.com>)
Ответы Re: Read Committed Transaction Isolation and SELECT ... UNION ... SELECT  (Eric Ridge <eebbrr@gmail.com>)
Список pgsql-general
Eric Ridge <eebbrr@gmail.com> writes:
> http://www.postgresql.org/docs/8.4/static/transaction-iso.html says:

> "Also note that two successive SELECT commands can see different data,
> even though they are within a single transaction, if other
> transactions commit changes during execution of the first SELECT."

> I get that what that means in normal cases, but what about a single
> query comprised of one or more unions:

>       SELECT ... FROM foo WHERE ...
>             UNION
>       SELECT  ... FROM foo WHERE ...

That's just one SELECT command.  Sub-SELECTs inside a query don't
count as separate commands for this purpose; the use of SELECT in
that way is just an artifact of the SQL grammar.

            regards, tom lane

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

Предыдущее
От: Eric Ridge
Дата:
Сообщение: Read Committed Transaction Isolation and SELECT ... UNION ... SELECT
Следующее
От: Raymond O'Donnell
Дата:
Сообщение: Re: pl/pgsql editor and postgres developemnt tool