Marko Tiikkaja-4 wrote
> I don't think this is relevant, since the changes were NOT made by the SQL
> command calling the function. They were made by the INSERT which executed
> earlier in a VOLATILE function.
Yes I should have read a few lines further, and wake up:
> Because of this snapshotting behavior, a function containing only SELECT
> commands can safely be marked STABLE, even if it selects from tables that
> might be undergoing modifications by concurrent queries. PostgreSQL will
> execute all commands of a STABLE function using the snapshot established
> for the calling query, and so it will see a fixed view of the database
> throughout that query.
Sorry for inconvenience. Hope the VOLATILE-STABLE difference in behavior
helps in resolving this bug.
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-bugs-f2117394.html