Re: Second RewriteQuery complains about first RewriteQuery in edge case - Mailing list pgsql-hackers

From Dean Rasheed
Subject Re: Second RewriteQuery complains about first RewriteQuery in edge case
Date
Msg-id CAEZATCXOL6F=AhP+JZjYuACSHsYKZLdC8-D76MiNJpZi1+VfiQ@mail.gmail.com
Whole thread Raw
In response to Re: Second RewriteQuery complains about first RewriteQuery in edge case  (Bernice Southey <bernice.southey@gmail.com>)
List pgsql-hackers
On Fri, 28 Nov 2025 at 09:21, Bernice Southey <bernice.southey@gmail.com> wrote:
>
> This is neat.
> Should the test be the rules one? Updatable views are more used, but
> your rules example has more coverage.

Yes, I think that's probably better. I've tweaked the test to use both
rules and updatable views, so that it has to deal with more than one
CTE. That way, it validates that we skip already-processed CTEs from
the right end of the list.

Pushed and back-patched.

Regards,
Dean



pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: Second RewriteQuery complains about first RewriteQuery in edge case
Next
From: Robert Haas
Date:
Subject: Re: should we have a fast-path planning for OLTP starjoins?