pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andreas Karlsson <andreas@proxel.se>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Andrew Gierth <andrew@tao11.riddles.org.uk>
Cc: David Fetter <david@fetter.org>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Early WIP/PoC for inlining CTEs
Date: Thu, 17 Jan 2019 10:52:19 -0500
Message-ID: <14326.1547740339@sss.pgh.pa.us> (raw)
In-Reply-To: <00818be9-2f63-f584-efcd-d97ee0662905@proxel.se>
References: <dccb37dd-2f52-dbd7-a4c4-72a5853f4838@proxel.se>
	<e02af96a-3e25-5de4-09a4-a7ebf3452184@proxel.se>
	<8810.1542402910@sss.pgh.pa.us>
	<d4daf011-01cf-6bf9-3f15-85ae1572e909@proxel.se>
	<87r2dxrw1z.fsf@news-spur.riddles.org.uk>
	<d0619160-10af-dcc9-4e7d-57845b92570c@proxel.se>
	<CAEepm=2x3kJ5AdkKmEf_ODAZm7+e=7DW1u-+ZwfncWvd8xDaiA@mail.gmail.com>
	<CA+Tgmob=Dpje+oGCYgJCoUok=iPQarGjPqRLYS1qKzChkFfKcA@mail.gmail.com>
	<20190111181934.g5qig23o7rxubnjt@alap3.anarazel.de>
	<CAEepm=2n8hChj548H0R5g5JAx3cokpZwTqRzYhN2oVGqBONwOA@mail.gmail.com>
	<20190111190403.77ye7m5mxypxsf4l@alap3.anarazel.de>
	<CA+TgmobVMPX1wJxPaRQ=FZBzp-AQ=JWK=bzxztqwj=MsOsrnrA@mail.gmail.com>
	<00818be9-2f63-f584-efcd-d97ee0662905@proxel.se>

Andreas Karlsson <andreas@proxel.se> writes:
> On 1/11/19 8:10 PM, Robert Haas wrote:
>> WITH cte_name [[NOT] MATERIALIZED] AS (query) main_query...

> Hm, when would one want "NOT MATERIALIZED"? I am not sure I see the 
> usefulness of forcing inlining other than if we by default do not inline 
> when a CTE is referenced multiple times.

I'm also concerned about what we do if the user says NOT MATERIALIZED
but there are semantic or implementation reasons not to inline.  Either
we throw an error or do something the user didn't expect, and neither
is very nice.  So I'm not in favor of having that option.

			regards, tom lane




view thread (112+ messages)  latest in thread

Message-ID: <14326.1547740339@sss.pgh.pa.us>
Permalink:  ../14326.1547740339@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/14326.1547740339@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, andreas@proxel.se, robertmhaas@gmail.com, andres@anarazel.de, thomas.munro@enterprisedb.com, andrew@tao11.riddles.org.uk, david@fetter.org
  Subject: Re: Early WIP/PoC for inlining CTEs
  In-Reply-To: <14326.1547740339@sss.pgh.pa.us>

* 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