Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gyr6i-0000Uo-H9 for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Feb 2019 04:46:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gyr6h-0005NV-Ak for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Feb 2019 04:46:11 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gyr6g-0005NO-W6 for pgsql-hackers@lists.postgresql.org; Wed, 27 Feb 2019 04:46:11 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gyr6e-0000Kq-Fy for pgsql-hackers@postgresql.org; Wed, 27 Feb 2019 04:46:09 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x1R4jub4022552; Tue, 26 Feb 2019 23:45:57 -0500 From: Tom Lane To: Andrew Gierth cc: Andreas Karlsson , Tomas Vondra , Merlin Moncure , Alvaro Herrera , Peter Eisentraut , Michael Paquier , Robert Haas , Andres Freund , Thomas Munro , David Fetter , Pg Hackers Subject: Re: Early WIP/PoC for inlining CTEs In-reply-to: <87h8cqf37i.fsf@news-spur.riddles.org.uk> References: <20190214160209.GA13250@alvherre.pgsql> <31353.1550351689@sss.pgh.pa.us> <62080f95-3934-4700-00ca-7c35630ab7a0@proxel.se> <87wolmg60q.fsf@news-spur.riddles.org.uk> <6696.1551192698@sss.pgh.pa.us> <87h8cqf37i.fsf@news-spur.riddles.org.uk> Comments: In-reply-to Andrew Gierth message dated "Wed, 27 Feb 2019 01:11:35 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <22550.1551242756.1@sss.pgh.pa.us> Date: Tue, 26 Feb 2019 23:45:56 -0500 Message-ID: <22551.1551242756@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andrew Gierth writes: > "Tom" == Tom Lane writes: > Tom> Also, I thought of a somewhat-related scenario that the code isn't > Tom> accounting for: you can break the restrictions about single > Tom> evaluation with nested WITHs, like > I also thought about that. But what I thought about it on reflection > was: if the user explicitly wrote NOT MATERIALIZED, then we should > assume they mean it. Ah, but the example I gave also had MATERIALIZED on the inner WITH. Why should the user not also mean that? regards, tom lane