@ -3819,7 +3819,7 @@ static List* RewriteQuery(Query* parsetree, List* rewrite_events)
|
|||||||
bool rewriteView = false;
|
bool rewriteView = false;
|
||||||
List* rewriteRelations = NIL;
|
List* rewriteRelations = NIL;
|
||||||
|
|
||||||
result_relation = linitial_int(parsetree->resultRelations);
|
result_relation = linitial2_int(parsetree->resultRelations);
|
||||||
|
|
||||||
if (result_relation == 0)
|
if (result_relation == 0)
|
||||||
return rewritten;
|
return rewritten;
|
||||||
|
@ -1452,5 +1452,14 @@ drop function trigger_func_update_multiview1();
|
|||||||
drop view multiview1;
|
drop view multiview1;
|
||||||
drop view multiview2;
|
drop view multiview2;
|
||||||
drop view multiview3;
|
drop view multiview3;
|
||||||
|
-- multi update with join
|
||||||
|
CREATE TABLE t1 (f1 int);
|
||||||
|
CREATE TABLE t2 (f1 int);
|
||||||
|
INSERT INTO t2 VALUES (1);
|
||||||
|
CREATE VIEW v1 AS SELECT * FROM t2;
|
||||||
|
UPDATE t2 AS A NATURAL JOIN v1 B SET B.f1 = 1;
|
||||||
|
drop table t1;
|
||||||
|
drop view v1;
|
||||||
|
drop table t2;
|
||||||
\c regression
|
\c regression
|
||||||
drop database multiupdate;
|
drop database multiupdate;
|
||||||
|
@ -639,5 +639,16 @@ drop function trigger_func_update_multiview1();
|
|||||||
drop view multiview1;
|
drop view multiview1;
|
||||||
drop view multiview2;
|
drop view multiview2;
|
||||||
drop view multiview3;
|
drop view multiview3;
|
||||||
|
-- multi update with join
|
||||||
|
CREATE TABLE t1 (f1 int);
|
||||||
|
CREATE TABLE t2 (f1 int);
|
||||||
|
INSERT INTO t2 VALUES (1);
|
||||||
|
CREATE VIEW v1 AS SELECT * FROM t2;
|
||||||
|
|
||||||
|
UPDATE t2 AS A NATURAL JOIN v1 B SET B.f1 = 1;
|
||||||
|
drop table t1;
|
||||||
|
drop view v1;
|
||||||
|
drop table t2;
|
||||||
|
|
||||||
\c regression
|
\c regression
|
||||||
drop database multiupdate;
|
drop database multiupdate;
|
Reference in New Issue
Block a user