Re: Does PERFORM hold a lock? - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Does PERFORM hold a lock?
Date
Msg-id 20090811201048.GE16362@alvh.no-ip.org
Whole thread Raw
In response to Does PERFORM hold a lock?  ("Peter Headland" <pheadland@actuate.com>)
List pgsql-general
Peter Headland wrote:
> If I do the following in a pl/pgsql function, will an update lock be
> held until the end of the transaction?
>
>   PERFORM c FROM t FOR UPDATE;

Yes.  (PERFORM is translated to SELECT by the plpgsql engine, so to the
SQL executor this is the same as SELECT FOR UPDATE).

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Race hazard deleting using CTID?
Next
From: "Peter Headland"
Date:
Subject: Re: Race hazard deleting using CTID?