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 1g7jWi-00031k-4w for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Oct 2018 15:57:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g7jWf-000329-T9 for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Oct 2018 15:57:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g7jWf-000322-M6 for pgsql-hackers@lists.postgresql.org; Wed, 03 Oct 2018 15:57:25 +0000 Received: from xvm-110-146.dc2.ghst.net ([46.226.110.146] helo=fetter.org) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g7jWc-0001cI-Oz for pgsql-hackers@postgresql.org; Wed, 03 Oct 2018 15:57:25 +0000 Received: by fetter.org (Postfix, from userid 1001) id 283C2408B6; Wed, 3 Oct 2018 17:57:21 +0200 (CEST) Date: Wed, 3 Oct 2018 17:57:20 +0200 From: David Fetter To: Andreas Karlsson Cc: Thomas Munro , Andrew Gierth , Pg Hackers Subject: Re: Early WIP/PoC for inlining CTEs Message-ID: <20181003155720.GG25294@fetter.org> References: <87sh48ffhb.fsf@news-spur.riddles.org.uk> <20180725054236.GB17411@fetter.org> <87bmavfjhy.fsf@news-spur.riddles.org.uk> <20180725191447.GE17411@fetter.org> <20180727081058.GN17411@fetter.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, Oct 02, 2018 at 12:03:06PM +0200, Andreas Karlsson wrote: > Hi, > > Here is an updated patch which adds some simple syntax for adding the > optimization barrier. For example: > > WITH x AS MATERIALIZED ( > SELECT 1 > ) > SELECT * FROM x; > > Andreas This is great! Is there any meaningful distinction between "inlining," by which I mean converting to a subquery, and predicate pushdown, which would happen at least for a first cut, at the rewrite stage? Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate