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 1fj5gx-0007eZ-5j for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Jul 2018 16:34:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fj5gs-0006ne-6V for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Jul 2018 16:34:06 +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 1fj5gr-0006nX-SE for pgsql-hackers@lists.postgresql.org; Fri, 27 Jul 2018 16:34:06 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fj5go-0002TY-6y for pgsql-hackers@postgresql.org; Fri, 27 Jul 2018 16:34:04 +0000 Received: from [192.168.127.1] (port=60673 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.88 (FreeBSD)) (envelope-from ) id 1fj5gg-000Jlh-Ag; Fri, 27 Jul 2018 16:33:54 +0000 Received: from [127.0.0.1] (port=29011 helo=caithnard.riddles.org.uk) by caithnard.riddles.org.uk with esmtp (Exim 4.89 (FreeBSD)) (envelope-from ) id 1fj5gf-0008lj-H8; Fri, 27 Jul 2018 16:33:53 +0000 From: Andrew Gierth To: Andreas Karlsson Cc: Nico Williams , David Fetter , pgsql-hackers@postgresql.org Subject: Re: Early WIP/PoC for inlining CTEs In-Reply-To: <28e6f571-000e-f087-0553-c2ee41eac293@proxel.se> (Andreas Karlsson's message of "Thu, 26 Jul 2018 14:51:53 +0200") Message-ID: <876010d4hi.fsf@news-spur.riddles.org.uk> 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> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix) Date: Fri, 27 Jul 2018 17:33:51 +0100 MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk >>>>> "Andreas" == Andreas Karlsson writes: >> WITH ctename AS [[NOT] MATERIALIZED] (query) Andreas> I think "NOT MATERIALIZED" would be a bit misleading since the Andreas> planner may choose to materialize anyway, It would certainly be possible to make an explicit NOT MATERIALIZED override such a choice by the planner, or produce an error if it is actually impossible to do so (e.g. using NOT MATERIALIZED on a wCTE) -- Andrew (irc:RhodiumToad)