Re: How does "SELECT ... FOR UPDATE" work? - Mailing list pgsql-novice

From Tom Lane
Subject Re: How does "SELECT ... FOR UPDATE" work?
Date
Msg-id 25036.1037983298@sss.pgh.pa.us
Whole thread Raw
In response to How does "SELECT ... FOR UPDATE" work?  (Joshua Daniel Franklin <joshua@iocc.com>)
List pgsql-novice
Joshua Daniel Franklin <joshua@iocc.com> writes:
> Obviously I'm missing something here.

I think you forgot to issue a "BEGIN;" to open a transaction block.
The lock created by FOR UPDATE (or any other lock) is only held till
transaction commit.

            regards, tom lane

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Viewing Foreign key constraints in psql
Next
From: Dan Jewett
Date:
Subject: Re: function does not exist error...