Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lock record in the table

Status
Not open for further replies.

tnerurkar

Programmer
Joined
Apr 9, 2003
Messages
35
Location
IN
Hi,

How can I lock record in the table in postgres. Means another person not even select the row which I m going to update the row in the table. I don't want to lock table.

Regards,
Tushar
 
Hi,

Thanks for quick reply.

If I do explicit locking even another user can select the record but will not update. I want another user should not select the particular record which I have lock for update.

Please tell me how to do this.

Regards,
Tushar
 
Hi

That is not possible exactly as you wish. "Row-level locks do not affect data querying". So you have to use [tt]access exclusive[/tt] locking mode.

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top