On Wed, Jul 06, 2011 at 12:54:21PM +0200, Willy-Bas Loos wrote: > I'd like to do a dirty read from plpgsql, so that i can stop the function > that is in a long loop without rolling back the work that it did. > All i want to read is a flag that says 'stop'. this doesn't need dirty read. just read committed. make table with flags, and insert there row which says "stop". make sure the insert gets committed. every so often, in your function check flags in the table, and since the change got committed - it will be visible, and function will stop. Best regards, depesz -- The best thing about modern society is how easy it is to avoid contact with it. http://depesz.com/ -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general