Re: any way for a transaction to "see" inserts done earlier in the transaction?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: any way for a transaction to "see" inserts done earlier in the transaction?
Дата
Msg-id 27525.1397693821@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: any way for a transaction to "see" inserts done earlier in the transaction?  (Susan Cassidy <susan.cassidy@decisionsciencescorp.com>)
Ответы Re: any way for a transaction to "see" inserts done earlier in the transaction?  (Susan Cassidy <susan.cassidy@decisionsciencescorp.com>)
Список pgsql-general
Susan Cassidy <susan.cassidy@decisionsciencescorp.com> writes:
> It is a fairly large and complex Perl program, so no, not really.
> I do an insert via a function, which returns the new id, then later I try
> to SELECT on that id, and it doesn't find it.

> Could it be because the insert is done inside a function?

Is the SELECT also inside a database function, and if so is that function
marked stable or immutable?  That might explain it --- non-volatile
functions are intentionally designed not to notice updates that happen
after they start.

            regards, tom lane


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

Предыдущее
От: Susan Cassidy
Дата:
Сообщение: Re: any way for a transaction to "see" inserts done earlier in the transaction?
Следующее
От: Susan Cassidy
Дата:
Сообщение: Re: any way for a transaction to "see" inserts done earlier in the transaction?