Re: [SQL] Rows with exclusive lock

2006-07-26 Thread Andrew Hammond
Martin Marques wrote: > On Sun, 23 Jul 2006, Alvaro Herrera wrote: > > > Martin Marques escribió: > >> > >> After the SELECT FOR UPDATE other transactions can still see the locked > >> rows. I want a read/write lock, so no one can access does rows. > > > > SELECT FOR UPDATE acquires an exclusive l

Re: [SQL] Rows with exclusive lock

2006-07-24 Thread Martin Marques
On Sun, 23 Jul 2006, Alvaro Herrera wrote: Martin Marques escribió: After the SELECT FOR UPDATE other transactions can still see the locked rows. I want a read/write lock, so no one can access does rows. SELECT FOR UPDATE acquires an exclusive lock, but other transactions must try to acquire

Re: [SQL] Rows with exclusive lock

2006-07-23 Thread Alvaro Herrera
Martin Marques escribió: > On Sat, 22 Jul 2006, Alvaro Herrera wrote: > > >Martin Marques escribió: > >>Is it posible to get an exclusive (read/write) lock on certain rows? I > >>don't want to block the whole table, only certain rows, but I want it to > >>be a read/write lock. > > > >That's what S

Re: [SQL] Rows with exclusive lock

2006-07-23 Thread Florian Weimer
* Martin Marques: >> That's what SELECT FOR UPDATE does. > > Hi Alvaro, > > After the SELECT FOR UPDATE other transactions can still see the > locked rows. I want a read/write lock, so no one can access does rows. You should probably run the other transactions at SERIALIZABLE level. I suppose thi

Re: [SQL] Rows with exclusive lock

2006-07-22 Thread Martin Marques
On Sat, 22 Jul 2006, Alvaro Herrera wrote: Martin Marques escribió: Is it posible to get an exclusive (read/write) lock on certain rows? I don't want to block the whole table, only certain rows, but I want it to be a read/write lock. That's what SELECT FOR UPDATE does. Hi Alvaro, After the

Re: [SQL] Rows with exclusive lock

2006-07-22 Thread Alvaro Herrera
Martin Marques escribió: > Is it posible to get an exclusive (read/write) lock on certain rows? I > don't want to block the whole table, only certain rows, but I want it to > be a read/write lock. That's what SELECT FOR UPDATE does. > AFAIK SELECT FOR UPDATE doesn't help with this. Why? -- A

[SQL] Rows with exclusive lock

2006-07-22 Thread Martin Marques
Is it posible to get an exclusive (read/write) lock on certain rows? I don't want to block the whole table, only certain rows, but I want it to be a read/write lock. AFAIK SELECT FOR UPDATE doesn't help with this. Do I have to go for another aproche? -- 21:50:04 up 2 days, 9:07, 0 users,