Rewrites CTEs only once to prevent a spurious error

Edit
ID 6254
Title Rewrites CTEs only once to prevent a spurious error
CI (CFBot) Needs rebase! Needs rebase since 1 week. Failing since 1 week.
Additional links previous successfully applied patch (outdated):
Summary
Stats (from CFBot) Unknown
Topic Bug Fixes
Tags Bugfix My First Patch
Created 2025-11-26 10:49:49
Last modified 2025-12-02 14:08:01 (1 week ago)
Latest email 2025-11-29 12:45:20 (1 week ago)
Status
PG19-4 (2026-01-01 – 2026-01-31): Committed
Target version
Authors Bernice Southey (fyrefreez)
Reviewers Become reviewer
Committer Dean Rasheed (deanr)
Links
Emails
Second RewriteQuery complains about first RewriteQuery in edge case
First at 2025-11-26 10:33:53 by Bernice Southey <bernice.southey at gmail.com>
Latest at 2025-11-29 12:45:20 by Dean Rasheed <dean.a.rasheed at gmail.com>
Latest attachment (v4-avoid-rewriting-data-modifying-CTEs-more-than-once.patch) at 2025-11-27 19:35:28 from Dean Rasheed <dean.a.rasheed at gmail.com>
    Attachment (v4-avoid-rewriting-data-modifying-CTEs-more-than-once.patch) at 2025-11-27 19:35:28 from Dean Rasheed <dean.a.rasheed at gmail.com> (Patch: Yes)
    Attachment (v3-avoid-rewriting-data-modifying-CTEs-more-than-once.patch) at 2025-11-27 14:31:10 from Bernice Southey <bernice.southey at gmail.com> (Patch: Yes)
    Attachment (v2-avoid-rewriting-CTEs-more-than-once.patch) at 2025-11-27 12:10:41 from Dean Rasheed <dean.a.rasheed at gmail.com> (Patch: Yes)
    Attachment (v1-0001-Rewrites-CTEs-only-once-to-prevent-a-spurious-error.patch) at 2025-11-26 10:33:53 from Bernice Southey <bernice.southey at gmail.com> (Patch: Yes)
History
When Who What
2025-12-02 14:08:01 Bernice Southey (fyrefreez) Closed in commitfest PG19-4 with status: Committed
2025-12-02 14:08:01 Bernice Southey (fyrefreez) Changed committer to deanr
2025-11-29 16:37:22 CFbot Patch needs rebase
2025-11-26 10:52:31 Bernice Southey (fyrefreez) Changed tags to Bugfix, My First Patch
2025-11-26 10:49:49 Bernice Southey (fyrefreez) Attached mail thread CAEDh4nyD6MSH9bROhsOsuTqGAv_QceU_GDvN9WcHLtZTCYM1kA@mail.gmail.com
2025-11-26 10:49:49 Bernice Southey (fyrefreez) Created patch record
Edit