possible to lock a single row in table?

From: bboett(at)erm1(dot)u-strasbg(dot)fr (Bruno Boettcher)
To: pgsql-sql(at)postgresql(dot)org
Subject: possible to lock a single row in table?
Date: 2001-06-20 14:46:36
Message-ID: 20010620164636.J13678@erm1.u-strasbg.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello!
i have a lots of threads that work on a table, making insertions,
updates removes.....

now i certain cases its important to keep data integrity, so i looked
into locks....

all i found was a lock function that locks the entire table....

now even in shared mode, if i understand it well this means that as long
as the locking procedure isn't finished, no other thread can update or
delete data, right? Thats really harsh, since there are really an awful
lot of threads....

isn't it possible to lock only a specific row?

and what happens to other insert queries whilst the lock is operational?
Are they postponed and the valling thread waits, or does the call return
with an error?

--
ciao bboett
==============================================================
bboett(at)earthling(dot)net
http://inforezo.u-strasbg.fr/~bboett http://erm1.u-strasbg.fr/~bboett
===============================================================
the total amount of intelligence on earth is constant.
human population is growing....

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Roberto Mello 2001-06-20 14:47:21 Re: [SQL] Re: Row Level Locking !!
Previous Message Markus Wagner 2001-06-20 12:53:32 evaluating values of attributes from computed attribute names in trigger function