From: Tom Lane <tgl@sss.pgh.pa.us>
To: kamil@monicz.dev
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #19106: Potential regression with CTE materialization planning in Postgres 18
Date: Sun, 09 Nov 2025 10:53:56 -0500
Message-ID: <1650412.1762703636@sss.pgh.pa.us> (raw)
In-Reply-To: <19106-9dd3668a0734cd72@postgresql.org>
References: <19106-9dd3668a0734cd72@postgresql.org>
PG Bug reporting form <noreply@postgresql.org> writes:
> After upgrading from Postgres 17 to 18, one of my queries started raising an
> error:
> "unexpected outer reference in CTE query"
I agree that sounds like a bug ...
> The problematic query is:
> https://github.com/openstreetmap-ng/openstreetmap-ng/blob/eb805d8766fb4b359b96eb6b50acc8c2a835a165/a...
... but I am not going to spend time trying to reproduce it given
this amount of detail. There's too much missing context, like what
data you were running the query on. I could spend all day, not
see the failure, and be left no wiser than before as to whether
it's already fixed or I just didn't duplicate your context closely
enough. Please see if you can reduce the problem case to a
self-contained SQL script.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, kamil@monicz.dev, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #19106: Potential regression with CTE materialization planning in Postgres 18
In-Reply-To: <1650412.1762703636@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox