Re: help lock record

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: bitrunner <bitrunner(at)katamail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: help lock record
Date: 2006-05-23 18:40:18
Message-ID: 3BAF0B35-0961-4581-AE90-CC14598D856A@fastcrypt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


On 23-May-06, at 1:37 PM, bitrunner wrote:

> For lock the record I use:
> select * from orders where id = 17 for update
>
> in this way lock the record with id = 17.
> If an other user demands the same record as I can understand that
> it is lock?
yes as long as autocommit is false this is true. In other words as
long as you do this inside a transaction/
>
> Thanks a lot.
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2006-05-23 19:27:12 Re: reading null date field
Previous Message Glenn Holmer 2006-05-23 18:34:53 reading null date field