Re: Re: LOCK TABLE - Mailing list pgsql-general

From Patrick Welche
Subject Re: Re: LOCK TABLE
Date
Msg-id 20000918181538.K2791@quartz.newn.cam.ac.uk
Whole thread Raw
In response to Re: Re: LOCK TABLE  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-general
On Sun, Sep 17, 2000 at 12:50:26PM -0700, Stephan Szabo wrote:
>
> If you always SELECT ... FOR UPDATE (in all transactions that access it),
> then the second one will not see the DB state before the transaction is
> started, because the row is locked and the second transaction won't be
> able to get its lock and will instead wait.  Admittedly this lowers your
> ability to have concurrent reads of the same rows as well, so you would
> want the other transactions to hold the lock for as short a time as
> possible.

I was wondering, if I do something like

select * from person order by surname for update limit 1 offset 10;

as there is no where clause, am I locking the whole table?


Cheers,

Patrick

pgsql-general by date:

Previous
From: "Muggleton, Keith"
Date:
Subject: Geometric Operations
Next
From: Scott Holdren
Date:
Subject: multiple referential integrity