Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fihXk-00057a-1s for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Jul 2018 14:47:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fihXh-00071q-DL for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Jul 2018 14:47:01 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fihXh-00071j-2i for pgsql-hackers@lists.postgresql.org; Thu, 26 Jul 2018 14:47:01 +0000 Received: from xvm-110-146.dc2.ghst.net ([46.226.110.146] helo=fetter.org) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fihXd-0001jS-K2 for pgsql-hackers@postgresql.org; Thu, 26 Jul 2018 14:46:59 +0000 Received: by fetter.org (Postfix, from userid 1001) id 668BC41CCF; Thu, 26 Jul 2018 16:46:55 +0200 (CEST) Date: Thu, 26 Jul 2018 16:46:55 +0200 From: David Fetter To: Andreas Karlsson Cc: Andrew Gierth , Nico Williams , pgsql-hackers@postgresql.org Subject: Re: Early WIP/PoC for inlining CTEs Message-ID: <20180726144654.GH17411@fetter.org> References: <87sh48ffhb.fsf@news-spur.riddles.org.uk> <20180725054236.GB17411@fetter.org> <20180725153205.GM5695@localhost> <877eljfhrx.fsf@news-spur.riddles.org.uk> <28e6f571-000e-f087-0553-c2ee41eac293@proxel.se> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <28e6f571-000e-f087-0553-c2ee41eac293@proxel.se> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Jul 26, 2018 at 02:51:53PM +0200, Andreas Karlsson wrote: > On 07/25/2018 06:08 PM, Andrew Gierth wrote: > >WITH ctename AS [[NOT] MATERIALIZED] (query) > > I think "NOT MATERIALIZED" would be a bit misleading since the > planner may choose to materialize anyway, so I suggest skipping that > part of the syntax unless there is a really strong reason for having > it. If we're going to give people specific knobs to turn as part of queries to affect query plans[1], we should think it through at a much higher level than this. If we're not going to do that right away, we just need to treat instances where the wrong call was made as planner bugs and address them at that level. Best, David. [1] Not to use the word that starts with 'h' and sounds like lints http://pghintplan.osdn.jp/ -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate