Re: Bug in query rewriter - hasModifyingCTE not getting set
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Greg Nancarrow <gregn4422@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2021-02-07T00:05:11Z
Lists: pgsql-hackers
Attachments
- propagate-CTE-property-flags-in-rewriter-2.patch (text/x-diff) patch
After poking around a bit more, I notice that the hasRecursive flag really ought to get propagated as well, since that's also an attribute of the CTE list. That omission doesn't seem to have any ill effect today, since nothing in planning or execution looks at that flag, but someday it might. So what I think we should do is as attached. (I re-integrated your example into with.sql, too.) Given the very limited time remaining before the release wrap, I'm going to go ahead and push this. regards, tom lane
Commits
-
Fix rewriter to set hasModifyingCTE correctly on rewritten queries.
- 362e2dcc4619 15.0 landed
- cbba6ba3a062 13.5 landed
- 9de082399cfe 10.19 landed
- 882b7e728835 11.14 landed
- 595ab8a5451b 9.6.24 landed
- 1fedbcc7ab26 12.9 landed
- 03d01d746b93 14.0 landed
-
Enable parallel SELECT for "INSERT INTO ... SELECT ...".
- 05c8482f7f69 14.0 landed
-
Revert "Propagate CTE property flags when copying a CTE list into a rule."
- f94924f01e48 11.11 landed
- d6759ac6a41e 10.16 landed
- d1d297985253 14.0 landed
- ac1df003f253 13.2 landed
- a64aacf152fc 9.5.25 landed
- 6f8e393a79e4 9.6.21 landed
- 46f297113598 12.6 landed
-
Propagate CTE property flags when copying a CTE list into a rule.
- ed2908963354 14.0 landed
- ce5f27fcae61 11.11 landed
- 739375174ae8 13.2 landed
- 56ff63cac94d 10.16 landed
- 4384eccb1549 9.5.25 landed
- 2a7664a79c16 12.6 landed
- 01e3fe3275af 9.6.21 landed