Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1coEhc-0006dt-P2 for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Mar 2017 19:35:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1coEhc-00040i-AJ for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Mar 2017 19:35:20 +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.84_2) (envelope-from ) id 1coEg8-0001Gk-Fl for pgsql-hackers@postgresql.org; Wed, 15 Mar 2017 19:33:48 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1coEg2-00020h-BH for pgsql-hackers@postgresql.org; Wed, 15 Mar 2017 19:33:47 +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 v2FJXSbY003087; Wed, 15 Mar 2017 15:33:28 -0400 From: Tom Lane To: Andres Freund cc: Heikki Linnakangas , Tomas Vondra , pgsql-hackers@postgresql.org Subject: Re: WIP: Faster Expression Processing v4 In-reply-to: <20170314224706.nxvtapenky6eom3z@alap3.anarazel.de> References: <20161206034955.bh33paeralxbtluv@alap3.anarazel.de> <20170209003312.rr7atqepgbrf4xqe@alap3.anarazel.de> <20170307030137.lpo4japv5oqgbqpz@alap3.anarazel.de> <2090fd00-4dec-7b42-f700-64308958504c@2ndquadrant.com> <20170313080351.4g5oubxcj4xj5y7t@alap3.anarazel.de> <20170314065259.ffef4tfhgbsaieoe@alap3.anarazel.de> <69b7bb0e-8dab-3d39-1a89-3c6ab6409f64@iki.fi> <20170314224706.nxvtapenky6eom3z@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Tue, 14 Mar 2017 15:47:06 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3085.1489606408.1@sss.pgh.pa.us> Date: Wed, 15 Mar 2017 15:33:28 -0400 Message-ID: <3086.1489606408@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Andres Freund writes: > [ latest patches ] I looked through 0002-Make-get_last_attnums-more-generic.patch. Although it seems relatively unobjectionable on its own, I'm not convinced that it's really useful to try to split it out like this. I see that 0004 removes the only call of ExecGetLastAttnums (the one in ExecBuildProjectionInfo) and then adds a single call in ExecInitExprSlots which is in execExpr.c. To me, the only reason ExecGetLastAttnums nee get_last_attnums is in execUtils.c in the first place is that it is a private subroutine of ExecBuildProjectionInfo. After these changes, it might as well be a private subroutine of ExecInitExprSlots. I'm suspicious of turning it into a globally accessible function as you've done here, because I doubt that it is of global use --- in particular, the fact that it doesn't deal specially with INDEX_VAR Vars seems rather specific to this one use-case. So for my money, you should drop 0002 altogether and just have 0004 remove get_last_attnums() from execUtils.c and stick it into execExpr.c. I suppose you still need the LastAttnumInfo API change so as to decouple it from ProjectionInfo, but that's minor. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers