vendredi 28 mars 2014

Can a SELECT performed with READ COMMITTED trigger an exception in Postgresql?


Vote count:

0




I need to take a snapshot (SELECT) of some table rows for display. These rows will never be modified or deleted in that same transaction, or transmitted to another transaction which could modify those rows. I only want a simple snapshot-like read in a Postgresql function.


For example:



SELECT * FROM "my_table" WHERE "amount" < 1000;


I was thinking about setting the READ COMMITTED transaction level in my Postgresql function:



SET TRANSACTION ISOLATION LEVEL READ COMMITTED;


Will this make sure I won't ever face an exception with my SELECT, no matter if other heavy and complex transactions are running simultaneously? I believe that yes, but I am not a Postgresql expert.



asked 51 secs ago

JVerstry

11.4k





Aucun commentaire:

Enregistrer un commentaire