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 1fiOee-000177-HE for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Jul 2018 18:36:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fiOec-0006tB-UP for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Jul 2018 18:36:54 +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 1fiOec-0006t4-Jp for pgsql-hackers@lists.postgresql.org; Wed, 25 Jul 2018 18:36:54 +0000 Received: from smtp17.dreamhost.com ([64.90.62.186] helo=pdx1-sub0-mail-a10.g.dreamhost.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fiOea-0000T6-2h for pgsql-hackers@postgresql.org; Wed, 25 Jul 2018 18:36:53 +0000 Received: from pdx1-sub0-mail-a10.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a10.g.dreamhost.com (Postfix) with ESMTP id 5A8D080E09; Wed, 25 Jul 2018 11:36:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cryptonector.com; h=date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=cryptonector.com; bh=LKVkxe1r40Gx81 /QjVP4nnNA39o=; b=GUbOrLe6EbWjDBsaEnJ1xzbrZbXA/YIbylcBsZsdQy2pCs 5OgiiLlyBjLVGfnvRxbaqTf65W8a6spWISYaAxRd1ep2TMalwwZ1TFd5Rfe2tVIp ijCesjH0RBvNo+XnDitC3jxoZtKd45Fg5Iq/4KTmIZ5KqNgFTNA74BFqViZws= Received: from localhost (cpe-70-123-158-140.austin.res.rr.com [70.123.158.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: nico@cryptonector.com) by pdx1-sub0-mail-a10.g.dreamhost.com (Postfix) with ESMTPSA id 5D66C80E0E; Wed, 25 Jul 2018 11:36:49 -0700 (PDT) Date: Wed, 25 Jul 2018 13:36:45 -0500 From: Nico Williams To: Andrew Gierth Cc: David Fetter , pgsql-hackers@postgresql.org Subject: Re: Early WIP/PoC for inlining CTEs Message-ID: <20180725183644.GO5695@localhost> References: <87sh48ffhb.fsf@news-spur.riddles.org.uk> <20180725054236.GB17411@fetter.org> <20180725153205.GM5695@localhost> <877eljfhrx.fsf@news-spur.riddles.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <877eljfhrx.fsf@news-spur.riddles.org.uk> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, Jul 25, 2018 at 05:08:43PM +0100, Andrew Gierth wrote: > Nico> It is possible to add a keyword for this purpose in the WITH syntax: > > Nico> WITH VIEW (...) AS a_view > > The existing (and standard) syntax is WITH ctename AS (query). Oy, I flubbed that up. > Syntaxes that have been suggested for explicitly controlling the > materialization are along the lines of: > > WITH ctename AS [[NOT] MATERIALIZED] (query) > > (MATERIALIZED is already an un-reserved keyword) Works for me.