Abbas Butt - 2014-03-04

Please re-confirm the bug report because I was not able to reproduce it on REL1_2_STABLE.

Also please share the output of
explain verbose update v1 set col2 = 20 where col1 = 2;

test=# create table t1 (col1 int, col2 int);
CREATE TABLE
test=# insert into t1 values (1,1);
INSERT 0 1
test=#
test=# create view v1 as select * from t1;
CREATE VIEW
test=# insert into v1 values (2,2);
INSERT 0 1
test=# update v1 set col2 = 20 where col1 = 2;
UPDATE 1
test=# update v1 set col2 = 20 where col2 = 2;
UPDATE 0
test=# explain verbose update v1 set col2 = 20 where col1 = 2;
QUERY PLAN


Update on public.t1 (cost=0.00..0.00 rows=1000 width=14)
Node/s: data_node_1, data_node_2, data_node_3, data_node_4
Node expr: t1.col1
Remote query: UPDATE ONLY public.t1 SET col1 = $1, col2 = $2 WHERE ((t1.ctid = $3) AND (t1.xc_node_id = $4))
-> Data Node Scan on t1 "REMOTE_TABLE_QUERY" (cost=0.00..0.00 rows=1000 width=14)
Output: t1.col1, 20, t1.col1, t1.col1, t1.ctid, t1.xc_node_id
Node/s: data_node_3
Remote query: SELECT col1, ctid, xc_node_id FROM ONLY public.t1 WHERE (col1 = 2)
(8 rows)