Hi,

I noticed a problem by trying to lock rows of the view for update,
if the definition of the view consists the reference to another view.

Example:

create table test (a int)

insert into test values (1)
insert into test values (2)
insert into test values (3)
insert into test values (4)

create view vtest1 as
select a from test
where a > 1

create view vtest2 as
select a from vtest1
where a > 2

If you try to lock rows in the view vtest1, everything is OK.

But if you try to lock rows in the view vtest2, this error message
occurs:

ERROR:  no relation entry for relid 5

Any ideas, whats wrong?

Best regards

Pavel Hanak


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to