Re: Early WIP/PoC for inlining CTEs

From: David Fetter <david(at)fetter(dot)org>
To: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Early WIP/PoC for inlining CTEs
Date: 2018-07-25 05:42:37
Message-ID: 20180725054236.GB17411@fetter.org
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

On Tue, Jul 24, 2018 at 11:28:21PM +0100, Andrew Gierth wrote:
> About a year ago I was briefly in discussion/collaboration with Adam Sah
> regarding the topic of inlining CTEs into the query rather than treating
> them as optimization barriers. We didn't take it very far (he sent me
> some stuff, I wrote some stuff and sent it back, things kind of got
> dropped at that point); but there's been some recent discussion of this
> and some people have expressed an interest in seeing the code.
>
> So I'm posting the parts that I wrote for the benefit of anyone wanting
> to pick up the issue again. The assumption of this code is that some
> form of syntax would exist to mark materialized CTEs and set the
> "ctematerialized" flag.
>
> I haven't rebased this or tested it since last year; this patch is
> against b81eba6a65.

Please find attached a version rebased atop 167075be3ab1547e18 with
what I believe are appropriate changes to regression test output. The
other changes to the regression tests output are somewhat puzzling, as
they change the actual results of queries. I've also attached both
the "leftover" diff and the files to which it should be applied.

Best,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

Attachment Content-Type Size
0001-Inlining-CTEs-v0002.patch text/x-diff 15.9 KB
regression.diffs text/plain 972 bytes
with.out text/plain 47.9 KB
window.out text/plain 116.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-07-25 05:48:57 Re: LLVM jit and matview
Previous Message Pavel Stehule 2018-07-25 04:59:00 Re: [HACKERS] plpgsql - additional extra checks