Re: How does "SELECT ... FOR UPDATE" work?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joshua Daniel Franklin <joshua(at)iocc(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: How does "SELECT ... FOR UPDATE" work?
Date: 2002-11-22 16:41:38
Message-ID: 25036.1037983298@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc pgsql-novice

Joshua Daniel Franklin <joshua(at)iocc(dot)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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message snpe 2002-11-22 17:32:41 Re: streaming result sets: progress
Previous Message Scott Lamb 2002-11-22 16:08:54 Re: streaming result sets: progress

Browse pgsql-novice by date

  From Date Subject
Next Message Dan Jewett 2002-11-22 18:05:11 Re: function does not exist error...
Previous Message Tom Lane 2002-11-22 15:18:06 Re: Viewing Foreign key constraints in psql