git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 672614c) | patch
Fix handling of data-modifying CTE subplans in EvalPlanQual.
2012年1月28日 22:43:57 +0000 (17:43 -0500)
2012年1月28日 22:43:57 +0000 (17:43 -0500)
commit 7c1719bc68ec1c347e7c80c3735bf3373e765f35
Fix handling of data-modifying CTE subplans in EvalPlanQual.

We can't just skip initializing such subplans, because the referencing CTE
node will expect to find the subplan available when it initializes. That
in turn means that ExecInitModifyTable must allow the case (which actually
it needed to do anyway, since there's no guarantee that ModifyTable is
exactly at the top of the CTE plan tree). So move the complaint about not
being allowed in EvalPlanQual mode to execution instead of initialization.
Testing turned up yet another problem, which is that we'd try to
re-initialize the result relation's index list, leading to leaks and
dangling pointers.

Per report from Phil Sorber. Back-patch to 9.1 where data-modifying CTEs
were introduced.
src/backend/executor/execMain.c diff | blob | blame | history
src/backend/executor/nodeModifyTable.c diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /