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 19:14:47
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Jul 25, 2018 at 04:18:42PM +0100, Andrew Gierth wrote:
> >>>>> "David" == David Fetter <david(at)fetter(dot)org> writes:
> David> Please find attached a version rebased atop 167075be3ab1547e18
> David> with what I believe are appropriate changes to regression test
> David> output. The other changes to the regression tests output are
> David> somewhat puzzling, as they change the actual results of queries.
> Both of those changes are the result of volatile CTEs being inlined more
> than once (in one case, as part of an explicit test to ensure that CTEs
> are being materialized and not multiply evaluated).
> If you look for the XXX comment in the patch, it should be easy to add a
> check that skips inlining if cterefcount > 1 and
> contains_volatile_functions is true.

Thanks for the broad hints!

Please find attached the next version, which passes 'make check'.

David Fetter <david(at)fetter(dot)org>
Phone: +1 415 235 3778

Remember to vote!
Consider donating to Postgres:

Attachment Content-Type Size
0001-Inlining-CTEs-v0003.patch text/x-diff 16.0 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Christoph Berg 2018-07-25 19:39:26 Re: JIT breaks PostGIS
Previous Message Andres Freund 2018-07-25 19:11:43 Re: JIT breaks PostGIS