Re: BUG #16255: No respect for 'not materialized' on CTEs with group by

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: robfordww(at)gmail(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16255: No respect for 'not materialized' on CTEs with group by
Date: 2020-02-12 15:11:37
Message-ID: 23590.1581520297@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Vera Gangeskar Johne 2020-02-12 18:59:56 pg_dump is not backwards compatible in PG12
Previous Message PG Bug reporting form 2020-02-12 12:28:25 BUG #16255: No respect for 'not materialized' on CTEs with group by