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 1gqJsT-0002vJ-09 for pgsql-hackers@arkaria.postgresql.org; Sun, 03 Feb 2019 15:40:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gqJsQ-0001e7-GI for pgsql-hackers@arkaria.postgresql.org; Sun, 03 Feb 2019 15:40:10 +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 1gqJsQ-0001dC-5P for pgsql-hackers@lists.postgresql.org; Sun, 03 Feb 2019 15:40:10 +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 1gqJsN-0003Fq-08 for pgsql-hackers@postgresql.org; Sun, 03 Feb 2019 15:40:08 +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 x13FdvJF005557; Sun, 3 Feb 2019 10:39:57 -0500 From: Tom Lane To: Vik Fearing cc: Peter Eisentraut , Robert Haas , Andreas Karlsson , Andres Freund , Thomas Munro , Andrew Gierth , David Fetter , Pg Hackers Subject: Re: Early WIP/PoC for inlining CTEs In-reply-to: <3b979d47-e98d-f3c6-f260-a88f3c470fe5@2ndquadrant.com> References: <87r2dxrw1z.fsf@news-spur.riddles.org.uk> <20190111181934.g5qig23o7rxubnjt@alap3.anarazel.de> <20190111190403.77ye7m5mxypxsf4l@alap3.anarazel.de> <00818be9-2f63-f584-efcd-d97ee0662905@proxel.se> <5715d93e-6ebc-be17-c2c3-56a873100a38@proxel.se> <29576.1548084476@sss.pgh.pa.us> <12408.1548707732@sss.pgh.pa.us> <32184.1548713132@sss.pgh.pa.us> <3b979d47-e98d-f! 3c6-f260-a88f3c470fe5@2ndquadrant.com> Comments: In-reply-to Vik Fearing message dated "Sun, 03 Feb 2019 12:16:59 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <5555.1549208397.1@sss.pgh.pa.us> Date: Sun, 03 Feb 2019 10:39:57 -0500 Message-ID: <5556.1549208397@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Vik Fearing writes: > On 28/01/2019 23:05, Tom Lane wrote: >> Peter Eisentraut writes: >>> Or put it at the end? >>> WITH ctename AS ( query ) MATERIALIZED >> Yeah, I thought about that too, but it doesn't seem like an improvement. >> If the query is very long (which isn't unlikely) I think people would >> prefer to see the option(s) up front. > On the other hand, the end is where the other options go (that we > haven't implemented yet). See . Yeah, I noticed that too while working on the latest patch revision. ISTM that's actually an argument for *not* putting PG-specific syntax there. We'd increase the risk of conflicting with future spec additions, assuming that they continue to add stuff at the end rather than just after AS. regards, tom lane