From: Nico Williams <nico@cryptonector.com>
To: David Fetter <david@fetter.org>
Cc: Andrew Gierth <andrew@tao11.riddles.org.uk>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Early WIP/PoC for inlining CTEs
Date: Wed, 25 Jul 2018 10:32:06 -0500
Message-ID: <20180725153205.GM5695@localhost> (raw)
In-Reply-To: <20180725054236.GB17411@fetter.org>
References: <87sh48ffhb.fsf@news-spur.riddles.org.uk>
<20180725054236.GB17411@fetter.org>
On Wed, Jul 25, 2018 at 07:42:37AM +0200, David Fetter wrote:
> 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.
I think the SQL programmer needs some control over whether a CTE is:
- a materialized view -- and therefore a barrier
- a view (which can then be inlined by the optimizer)
It is possible to add a keyword for this purpose in the WITH syntax:
WITH VIEW (...) AS a_view
, MATERIALIZED VIEW (...) AS a_barrier
...;
This would be a lot like creating TEMP views, but without the catalog
overhead.
(I wonder how hard it would be to partiion the OID namespace into
temp/persistent ranges so that temp schema elements need not be written
into the catalog.)
Nico
--
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: nico@cryptonector.com, david@fetter.org, andrew@tao11.riddles.org.uk
Subject: Re: Early WIP/PoC for inlining CTEs
In-Reply-To: <20180725153205.GM5695@localhost>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox