Possible incorrect computation of scanCols in UPDATE
Opened this issue · 0 comments
soumyadeep2007 commented
This is a thread for collecting cases where scanCols is wrongly computed for UPDATE.
Case 1:
drop table if exists t1;
create table t1(a int, b int);
insert into t1 values(2,1);
analyze t1;
drop table if exists t2;
create table t2(a int, b int, c int);
insert into t2 select i, i%2, i from generate_series(1,5)i;
insert into t2 select i, i, i from generate_series(1,5)i;
analyze t2;
UPDATE t2 SET b = 2 WHERE a = (SELECT a FROM t1);