How to isolate the result of SELECT's?

From: Andre Lopes <lopes80andre(at)gmail(dot)com>
To: postgresql Forums <pgsql-general(at)postgresql(dot)org>
Subject: How to isolate the result of SELECT's?
Date: 2012-03-18 23:33:27
Message-ID: CAGFRAbPa5kk1xx9U_-jF+_Q6avimW=jHBtNphchVP4XJ0R9N=g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I need to do an operation that I will use some SELECT's and get the
results, but I want to have sure that those tables have not been
changed with INSERT's or UPDATES during the operation.

Example:

BEGIN OPERATION
Select field from table1;
...
Select other_field from table2;
...
END OPERATION

How can I lock these tables to assure that the tables are not getting
INSERTS's or UPDATE's during the operation?

Best Regards,

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Nolan 2012-03-19 00:00:05 Re: How to isolate the result of SELECT's?
Previous Message Florent THOMAS 2012-03-18 20:12:11 Multi server query