Re: SELECT FOR UPDATE - release lock? - Mailing list pgsql-novice

From Bruno Wolff III
Subject Re: SELECT FOR UPDATE - release lock?
Date
Msg-id 20060504202126.GB25362@wolff.to
Whole thread Raw
In response to SELECT FOR UPDATE - release lock?  ("Christian Hofmann" <christian.hofmann@gmx.de>)
Responses Re: SELECT FOR UPDATE - release lock?
List pgsql-novice
On Thu, May 04, 2006 at 22:08:16 +0200,
  Christian Hofmann <christian.hofmann@gmx.de> wrote:
> Hello,
>
> for some tables I am using a "select a,b,c from mytable where x='abc' FOR
> UPDATE" query to prevent other servers also modify this data while I am
> reading the data and decide to modify the data.
>
> Now sometimes I don't want to make an update. Is there a way to release the
> lock. Or is the lock released by simply call commit?

Locks are released when transactions end.

pgsql-novice by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: SQL Order Question
Next
From:
Date:
Subject: Re: SQL Order Question