Search Postgresql Archives

Re: How to isolate the result of SELECT's?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Sun, Mar 18, 2012 at 6:33 PM, Andre Lopes <lopes80andre@xxxxxxxxx> wrote:
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,\


Isn't that what 'begin transaction' and 'commit' are for?
 --
Mike Nolan

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux