Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1coXcu-0002xF-K7 for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Mar 2017 15:47:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1coXct-00038m-Rz for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Mar 2017 15:47:43 +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 1coXcs-00036S-UE for pgsql-hackers@postgresql.org; Thu, 16 Mar 2017 15:47:42 +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 1coXco-0000EH-HE for pgsql-hackers@postgresql.org; Thu, 16 Mar 2017 15:47:42 +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 v2GFlP7S011866; Thu, 16 Mar 2017 11:47:25 -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: <10634.1489677316@sss.pgh.pa.us> 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> <13062.1489622943@sss.pgh.pa.us> <20170316004720.76oqddhtvsk6noqp@alap3.anarazel.de> <10634.1489677316@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Thu, 16 Mar 2017 11:15:16 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <11864.1489679245.1@sss.pgh.pa.us> Date: Thu, 16 Mar 2017 11:47:25 -0400 Message-ID: <11865.1489679245@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 I wrote: > Andres Freund writes: >> I don't think there's a danger similar to f0c7b789a here, because the >> "caller" (i.e. the node that needs the expression's result) expects >> resvalue/null to be overwritten. > Yeah, that's what I thought when I wrote the broken code in ExecEvalCase, > too. It was wrong. Along the same line, I notice that you've got some expr step types overwriting their own input, the various flavors of EEOP_BOOLTEST for example. Maybe that's all right but it doesn't really give me a warm feeling, especially when other single-argument operations like EEOP_BOOL_NOT_STEP are done differently. Again, I think a clear explanation of the design is essential to allow people to reason about whether this sort of trickery is safe. 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