On Mon, Aug 15, 2011 at 3:51 AM, Heikki Linnakangas <heikki.linnakan...@enterprisedb.com> wrote: > It would be nice a symmetry, but you'd need a limitation that > pg_import_snapshot() must be the first thing you do in the session. And it > might be hard to enforce that, as once you get control into the function, > you've already acquired another snapshot in the transaction to run the > "SELECT pg_import_snapshot()" query with. Specifying the snapshot in the > BEGIN command makes sense.
+1. Also, I am pretty sure that there are drivers out there, and connection poolers, that keep track of the transaction state by watching commands go by. Right now you can tell by the first word of the command whether it's something that might change the transaction state; I wouldn't like to make that harder. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (firstname.lastname@example.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers