Re: loop with circular updates

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: loop with circular updates
Дата
Msg-id 24722.1154101568@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: loop with circular updates  (Jessica M Salmon <jmsalmon@fs.fed.us>)
Ответы Re: loop with circular updates  (Jessica M Salmon <jmsalmon@fs.fed.us>)
Список pgsql-general
Jessica M Salmon <jmsalmon@fs.fed.us> writes:
>       -is it true that when looping over query results in a plpgsql
> for..in..execute loop, several records are stored in memory at one time?

Yes, but that's got nothing to do with your issue.

>       -if I then update one of the records currently in memory, are these
> changes visible when the loop gets to it?

*All* queries in Postgres see a snapshot as of the instant of query
start.  This is a property of the MVCC rules and has nothing to do with
buffering.  What's returned by a FOR IN EXECUTE is whatever was in the
database when the loop began.

            regards, tom lane

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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: Create spatial_ref_sys entry from srtext ?
Следующее
От: "Sandeep Kumar Jakkaraju"
Дата:
Сообщение: Help