Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crzZe-0005Zz-F0 for pgsql-committers@arkaria.postgresql.org; Sun, 26 Mar 2017 04:14:38 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1crzZd-0003DX-Oy for pgsql-committers@arkaria.postgresql.org; Sun, 26 Mar 2017 04:14:37 +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.84_2) (envelope-from ) id 1crzZd-0003DA-3A for pgsql-committers@postgresql.org; Sun, 26 Mar 2017 04:14:37 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1crzZZ-0000CT-8U for pgsql-committers@postgresql.org; Sun, 26 Mar 2017 04:14:35 +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 v2Q4EUTJ024362; Sun, 26 Mar 2017 00:14:30 -0400 From: Tom Lane To: Andres Freund cc: pgsql-committers@postgresql.org Subject: Re: pgsql: Remove unreachable code in expression evaluation. In-reply-to: References: Comments: In-reply-to Andres Freund message dated "Sat, 25 Mar 2017 23:03:21 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <24360.1490501670.1@sss.pgh.pa.us> Date: Sun, 26 Mar 2017 00:14:30 -0400 Message-ID: <24361.1490501670@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-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org Andres Freund writes: > Remove unreachable code in expression evaluation. > The previous code still contained expression evaluation time support > for CaseExprs without a defresult. But transformCaseExpr() creates a > default expression if necessary. BTW, now that I think about it, I wonder if a better answer wouldn't be to leave the execExpr code as it stood, and remove the code in transformCaseExpr that pre-creates a default expression. You'd end up with identical code at runtime, and eliminate some parse/rewrite/plan overhead for dealing with that subexpression. It's possible there's some code somewhere else that expects defresult to always be non-null, but I can't think what, or why that would be a good thing to assume. regards, tom lane -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers