Re: Row locking inside a rule, is it possible?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Denis Chavez <dnchavez(at)gmx(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Row locking inside a rule, is it possible?
Date: 2002-04-06 06:26:07
Message-ID: 23535.1018074367@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Denis Chavez <dnchavez(at)gmx(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Kancha . 2002-04-06 09:24:42 libpgeasy.h
Previous Message Denis Chavez 2002-04-06 05:30:39 Re: Row locking inside a rule, is it possible?