SELECT...FOR UPDATE OF class_name - Mailing list pgsql-hackers

From Kristofer Munn
Subject SELECT...FOR UPDATE OF class_name
Date
Msg-id Pine.LNX.4.04.10001160236240.28091-100000@munn.com
Whole thread Raw
Responses Re: [HACKERS] SELECT...FOR UPDATE OF class_name
List pgsql-hackers
Hi all - ran into this little parser idiosyncrasy today... Workaround was
simple but this should probably go on somebody's list somewhere.

[PostgreSQL 6.5.3 on i686-pc-linux-gnu, compiled by gcc egcs-2.91.66]

mail=> create table tbl1 ( id1 int4 );
CREATE

mail=> create table tbl2 ( id2 int4, id1 int4 ) ;
CREATE

mail=> select 1 from tbl2 t2, tbl1 t1 where t1.id1 = t2.id1 andt2.id1 = 7 for update ;
?column?
--------
(0 rows)

mail=> select 1 from tbl2 t2, tbl1 t1 where t1.id1 = t2.id1 andt2.id1 = 7 for update of t2;
?column?
--------
(0 rows)

mail=> select 1 from tbl2 t2, tbl1 t1 where t1.id1 = t2.id1 and t2.id1 = 7 for update of tbl2;

ERROR:  FOR UPDATE: relation tbl2 not found in FROM clause

- K

Kristofer Munn * KMI * 973-509-9414 * AIM KrMunn * http://www.munn.com/



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Temp Tables: Trying to delete a reldesc...
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] SELECT...FOR UPDATE OF class_name