SetQuerySnapshot inside PL/PGSQL ?
От | D. Dante Lorenso |
---|---|
Тема | SetQuerySnapshot inside PL/PGSQL ? |
Дата | |
Msg-id | 005801c31abc$4b3eb340$1564a8c0@ROMULUS обсуждение исходный текст |
Ответ на | Re: Serialization, Locking...implement processing Queue with a table ("D. Dante Lorenso" <dante@lorenso.com>) |
Список | pgsql-general |
I really want to see newly committed data when I am INSIDE a PL/PGSQL function. This way, if I do a LOCK on a table and subsequently perform a SELECT after aquiring the lock, I know I'll see the data that any previous transactions just updated (hence they released my lock)... So, if you don't want to do the auto 'SetQuerySnapshot' calls as they probably should be, is there a way I can call this from the PL/PGSQL function myself, directly? Something like this: -------------------- 8< -------------------- CREATE OR REPLACE... ... BEGIN LOCK TABLE blah_blah... EXCLUSIVE MODE; SetQuerySnapshot(); <----------- I want something like this SELECT id FROM table WHERE blah blah blah ... FOR UPDATE; IF NOT FOUND THEN ... ELSE ... END IF; END; ... -------------------- 8< -------------------- Something like that might solve my problem whereby I'd like the PL/pgSQL function to be able to work as if it were in READ COMMITTED mode. Dante D. Dante Lorenso dante@lorenso.com 972-333-4139
В списке pgsql-general по дате отправления: