Fix parent of WCO qual.
The parent of some WCO expressions was, apparently by accident, set to the the source of DML queries, rather than the target table. This causes problems for the upcoming pluggable storage work, because the target and source table might be of different storage types. It's possible that this is already problematic, but neither experimenting nor inquiries on -hackers have found them. So don't backpatch for now. Author: Andres Freund Discussion: https://postgr.es/m/20181205225213.hiwa3kgoxeybqcqv@alap3.anarazel.de
This commit is contained in:
parent
1c53c4dec3
commit
148e632c05
@ -2270,7 +2270,7 @@ ExecInitModifyTable(ModifyTable *node, EState *estate, int eflags)
|
|||||||
{
|
{
|
||||||
WithCheckOption *wco = (WithCheckOption *) lfirst(ll);
|
WithCheckOption *wco = (WithCheckOption *) lfirst(ll);
|
||||||
ExprState *wcoExpr = ExecInitQual((List *) wco->qual,
|
ExprState *wcoExpr = ExecInitQual((List *) wco->qual,
|
||||||
mtstate->mt_plans[i]);
|
&mtstate->ps);
|
||||||
|
|
||||||
wcoExprs = lappend(wcoExprs, wcoExpr);
|
wcoExprs = lappend(wcoExprs, wcoExpr);
|
||||||
}
|
}
|
||||||
|
@ -1783,7 +1783,7 @@ ERROR: new row violates check option for view "rw_view1"
|
|||||||
DETAIL: Failing row contains (15).
|
DETAIL: Failing row contains (15).
|
||||||
EXPLAIN (costs off) INSERT INTO rw_view1 VALUES (5);
|
EXPLAIN (costs off) INSERT INTO rw_view1 VALUES (5);
|
||||||
QUERY PLAN
|
QUERY PLAN
|
||||||
---------------------------------------------------------------
|
---------------------------------------------------------
|
||||||
Insert on base_tbl b
|
Insert on base_tbl b
|
||||||
-> Result
|
-> Result
|
||||||
SubPlan 1
|
SubPlan 1
|
||||||
@ -1795,7 +1795,7 @@ EXPLAIN (costs off) INSERT INTO rw_view1 VALUES (5);
|
|||||||
|
|
||||||
EXPLAIN (costs off) UPDATE rw_view1 SET a = a + 5;
|
EXPLAIN (costs off) UPDATE rw_view1 SET a = a + 5;
|
||||||
QUERY PLAN
|
QUERY PLAN
|
||||||
-----------------------------------------------------------------
|
-----------------------------------------------------------
|
||||||
Update on base_tbl b
|
Update on base_tbl b
|
||||||
-> Hash Join
|
-> Hash Join
|
||||||
Hash Cond: (b.a = r.a)
|
Hash Cond: (b.a = r.a)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user