Content-Length: 260926 | pFad | http://github.com/postgrespro/postgres/commit/d06aba240d24c499cdd5e77695b3cd28a094e648

4D Fix parent node of WCO expressions in partitioned tables. · postgrespro/postgres@d06aba2 · GitHub
Skip to content

Commit d06aba2

Browse files
committed
Fix parent node of WCO expressions in partitioned tables.
Since edd4473 WCO expressions of partitioned tables are initialized with the first subplan as parent. That's not correct, as the correct context is the ModifyTableState node. That's also what is used for RETURNING processing, initialized nearby. This appears not to cause any visible problems for in core code, but is problematic for in development patch. Discussion: https://postgr.es/m/20180303043818.tnvlo243bgy7una3@alap3.anarazel.de
1 parent 854dd8c commit d06aba2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/executor/execPartition.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ ExecInitPartitionInfo(ModifyTableState *mtstate,
413413
{
414414
WithCheckOption *wco = castNode(WithCheckOption, lfirst(ll));
415415
ExprState *wcoExpr = ExecInitQual(castNode(List, wco->qual),
416-
mtstate->mt_plans[0]);
416+
&mtstate->ps);
417417

418418
wcoExprs = lappend(wcoExprs, wcoExpr);
419419
}

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/d06aba240d24c499cdd5e77695b3cd28a094e648

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy