How to lock a table

Started by Morten W. Petersenalmost 26 years ago2 messagesgeneral
Jump to latest

We're trying to use a unique-identifier scheme in a database; and
therefore we need to put a lock on a table.

Is there some way to do this using the PyGres (python) adapter?

-Morten

-------------------------------------------------------------
How to reply to email:
http://home.sol.no/~vidaandr/news/OBSquoting.html (norsk)
http://home.sol.no/~vidaandr/news/FAQquoting.html (english)

Who is the bigger fool? The fool or the fool who follows him?

#2Thomas Lockhart
lockhart@alumni.caltech.edu
In reply to: Morten W. Petersen (#1)
Re: How to lock a table

We're trying to use a unique-identifier scheme in a database; and
therefore we need to put a lock on a table.

Are you sure? Please describe the problem which absolutely requires a
full table-level lock...

Is there some way to do this using the PyGres (python) adapter?

select * from t1 where 1 = 0;

or

lock table t1;

- Thomas