From: | Nico Williams <nico(at)cryptonector(dot)com> |
---|---|
To: | David Fetter <david(at)fetter(dot)org> |
Cc: | Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Early WIP/PoC for inlining CTEs |
Date: | 2018-07-25 15:32:06 |
Message-ID: | 20180725153205.GM5695@localhost |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
--
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2018-07-25 15:33:14 | Re: Missing pg_control crashes postmaster |
Previous Message | Andres Freund | 2018-07-25 15:26:14 | Re: Missing pg_control crashes postmaster |