Re: Row locking inside a rule, is it possible? - Mailing list pgsql-general

From Tom Lane
Subject Re: Row locking inside a rule, is it possible?
Date
Msg-id 23535.1018074367@sss.pgh.pa.us
Whole thread Raw
In response to Re: Row locking inside a rule, is it possible?  (Denis Chavez <dnchavez@gmx.net>)
List pgsql-general
Denis Chavez <dnchavez@gmx.net> writes:
> ... My advice: when selecting for update inside a rule, we must
> especify the table twice?, that is: SELECT * FROM tablename WHERE ... FOR
> UPDATE OF tablename;  :-)

Hmm.  Seems that the problem is this: the unadorned FOR UPDATE tries
to apply FOR UPDATE to OLD and NEW as well as the regular tables
mentioned in your SELECT.  FOR UPDATE of NEW doesn't work ... and
is fairly nonsensical anyway ...

            regards, tom lane

pgsql-general by date:

Previous
From: Denis Chavez
Date:
Subject: Re: Row locking inside a rule, is it possible?
Next
From: "Kancha ."
Date:
Subject: libpgeasy.h