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