From: Tom Lane <tgl@sss.pgh.pa.us>
To: robfordww@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16255: No respect for 'not materialized' on CTEs with group by
Date: Wed, 12 Feb 2020 10:11:37 -0500
Message-ID: <23590.1581520297@sss.pgh.pa.us> (raw)
In-Reply-To: <16255-e18a59c1ef606bbc@postgresql.org>
References: <16255-e18a59c1ef606bbc@postgresql.org>
PG Bug reporting form <noreply@postgresql.org> writes:
> I have an simple CTE expression with group by and a string_aggr() function,
> and Postgresql seems to materialize it anyhow, even if 'not materialized' is
> instructed. I can't see that this is documented behaviour.
Since you haven't given a concrete example, nobody else can see whether it
is either. But in general, there is no guarantee that "NOT MATERIALIZED"
will do anything. There are multiple conditions that will prevent
inlining a CTE, either for semantic or implementation reasons.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, robfordww@gmail.com
Subject: Re: BUG #16255: No respect for 'not materialized' on CTEs with group by
In-Reply-To: <23590.1581520297@sss.pgh.pa.us>
References: <16255-e18a59c1ef606bbc@postgresql.org> <23590.1581520297@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