Re: Is replacing transactions with CTE a good idea?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Is replacing transactions with CTE a good idea?
Дата
Msg-id 20210401193929.GA18029@momjian.us
обсуждение исходный текст
Ответ на Re: Is replacing transactions with CTE a good idea?  (Dave Cramer <davecramer@postgres.rocks>)
Ответы Re: Is replacing transactions with CTE a good idea?  (Dave Cramer <davecramer@postgres.rocks>)
Список pgsql-general
On Thu, Apr  1, 2021 at 11:24:48AM -0400, Dave Cramer wrote:
> CTE's don't change the isolation level. I'm not sure what you are getting at
> here ?

I think what he/she means here is that all queries in a CTE use a single
snapshot, meaning you don't see changes by commits that happen between
queries that are part of the same CTE.  If you were running the queries
separately in read committed mode, you would see those changes, but you
would not see them in repeatable read or serializable transaction mode.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  If only the physical world exists, free will is an illusion.




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

Предыдущее
От: Paul Jungwirth
Дата:
Сообщение: Re: Slick way to update multiple tables.
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Upgrading from 11 to 13