Re: [HACKERS] CTE inlining - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] CTE inlining
Date
Msg-id 19072.1493526526@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] CTE inlining  (Craig Ringer <craig.ringer@2ndquadrant.com>)
Responses Re: [HACKERS] CTE inlining  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: [HACKERS] CTE inlining  (Andres Freund <andres@anarazel.de>)
Re: [HACKERS] CTE inlining  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Re: [HACKERS] CTE inlining  (Gavin Flower <GavinFlower@archidevsys.co.nz>)
List pgsql-hackers
Craig Ringer <craig.ringer@2ndquadrant.com> writes:
> - as you noted, it is hard to decide when it's worth inlining vs
> materializing for CTE terms referenced more than once.

[ raised eyebrow... ]  Please explain why the answer isn't trivially
"never".

There's already a pretty large hill to climb here in the way of
breaking peoples' expectations about CTEs being optimization
fences.  Breaking the documented semantics about CTEs being
single-evaluation seems to me to be an absolute non-starter.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Re: [HACKERS] CTE inlining
Next
From: Pavel Stehule
Date:
Subject: Re: [HACKERS] CTE inlining