Re: table locking - Mailing list pgsql-sql

From Shane Wright
Subject Re: table locking
Date
Msg-id 200202181546.g1IFk4l28406@fullerruss.dsvr.co.uk
Whole thread Raw
In response to Re: table locking  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
Hi Tom,

Thanks for the input, but I specifically can't use SELECT.. FOR UPDATE as the 
SELECT won't match any rows (it isnt supposed to, there's an explanation as 
to in a post I've just sent).  

I had thought about ACCESS EXCLUSIVE MODE; but it looks like it'll block all 
other readers as well, which isn't necessary.

Thanks

--
Shane

On Monday 18 Feb 2002 3:42 pm, Tom Lane wrote:
> I think you want just LOCK TABLE tab IN SHARE ROW EXCLUSIVE MODE
> or LOCK TABLE tab IN EXCLUSIVE MODE.  The latter would lock out
> SELECT FOR UPDATE, the former wouldn't.
>
>             regards, tom lane


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: table locking
Next
From: Shane Wright
Date:
Subject: Re: table locking