Fix order of shutdown processing when CTEs contain inter-references.
Tom Lane <tgl@sss.pgh.pa.us>
Fix order of shutdown processing when CTEs contain inter-references. We need ExecutorEnd to run the ModifyTable nodes to completion in reverse order of initialization, not forward order. Easily done by constructing the list back-to-front.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/executor/nodeModifyTable.c | modified | +6 −3 |
| src/test/regress/expected/with.out | modified | +76 −0 |
| src/test/regress/sql/with.sql | modified | +26 −0 |