Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cru2A-0000jg-QT for pgsql-hackers@arkaria.postgresql.org; Sat, 25 Mar 2017 22:19:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cru2A-0005Dc-D3 for pgsql-hackers@arkaria.postgresql.org; Sat, 25 Mar 2017 22:19:42 +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 1cru0h-0002ZZ-D1 for pgsql-hackers@postgresql.org; Sat, 25 Mar 2017 22:18:11 +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 1cru0e-0007nU-W6 for pgsql-hackers@postgresql.org; Sat, 25 Mar 2017 22:18:10 +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 v2PMHtUN004835; Sat, 25 Mar 2017 18:17:55 -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: <20170325221142.n6exw2jsubo4ywvg@alap3.anarazel.de> References: <8011.1490305255@sss.pgh.pa.us> <26088.1490315792@sss.pgh.pa.us> <20170324004734.3a2dokbfofiz6ylu@alap3.anarazel.de> <30270.1490318779@sss.pgh.pa.us> <20170324013412.qy7ltnnqv5m7qiuc@alap3.anarazel.de> <31825.1490320683@sss.pgh.pa.us> <20170324020003.4rt63xty7xpb4akq@alap3.anarazel.de> <22215.1490369187@sss.pgh.pa.us> <20170324182742.3r4qndpugtx6ga3t@alap3.anarazel.de> <22833.1490390175@sss.pgh.pa.us> <20170325221142.n6exw2jsubo4ywvg@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Sat, 25 Mar 2017 15:11:42 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4833.1490480275.1@sss.pgh.pa.us> Date: Sat, 25 Mar 2017 18:17:55 -0400 Message-ID: <4834.1490480275@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: > - The !caseExpr->defresult result branch is currently unreachable (and > its equivalent was before the patch) because transformCaseExpr() > generates a default expression. I'm inclined to replace the dead code > with an assertion. Any reason not to do that? Ah-hah. I'd noted that that code wasn't being reached when I did some code coverage checks this morning, but I hadn't found the cause yet. Yeah, replacing the if-test with an assert seems fine. > I think there's some argument to be made that we should move all of > execSRF.c's logic to their respective callsites. There's not really > much shared code: ExecEvalFuncArgs(), tupledesc_match(), init_sexpr() - > and at least the latter would even become a bit simpler if we didn't > support both callers. Possibly. All that code could stand to be rethought, probably, now that its mission is just to handle the SRF case. But at least all the cruft is in one place for the moment. And I don't think it's anything we have to fix before v10, it's just cosmetic. > Thanks a lot for your work on the patch! You're welcome! 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