]> granicus.if.org Git - postgresql/commit
Fix for this problem:
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 5 Nov 2003 22:00:52 +0000 (22:00 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 5 Nov 2003 22:00:52 +0000 (22:00 +0000)
commit5781237531d301b1e15e9c002786e7e135ef7f99
tree6decf086d61b38fa296f1caf599ecffd07839489
parent967cd91b088d82225a19f49fc213449a455d2b13
Fix for this problem:

regression=# select 1 from tenk1 ta cross join tenk1 tb for update;
ERROR:  no relation entry for relid 3

7.3 said "SELECT FOR UPDATE cannot be applied to a join", which was better
but still wrong, considering that 7.2 took the query just fine.  Fix by
making transformForUpdate() ignore JOIN and other special RTE types,
rather than trying to mark them FOR UPDATE.  The actual error message now
only appears if you explicitly name the join in FOR UPDATE.
src/backend/optimizer/plan/initsplan.c
src/backend/parser/analyze.c