Early WIP/PoC for inlining CTEs

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Early WIP/PoC for inlining CTEs
Date: 2018-07-24 22:28:21
Message-ID: 87sh48ffhb.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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.

Posted for discussion, further development, criticism, whatever; feel
free to include this (with credit) in any relevant patch. Consider this
released under the PG license.

Andrew (irc:RhodiumToad)

Attachment Content-Type Size
cteinline.patch text/x-patch 7.7 KB


Browse pgsql-hackers by date

  From Date Subject
Next Message Isaac Morland 2018-07-24 22:29:37 Re: How can we submit code patches that implement our (pending) patents?
Previous Message Nico Williams 2018-07-24 22:17:06 Re: How can we submit code patches that implement our (pending) patents?