pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: WIP: Faster Expression Processing v4
Date: Thu, 16 Mar 2017 11:47:25 -0400
Message-ID: <11865.1489679245@sss.pgh.pa.us> (raw)
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>
	<fcdaa51b-e905-72e0-39dd-5e22f535a253@2ndquadrant.com>
	<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>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

I wrote:
> Andres Freund <andres@anarazel.de> 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



view thread (107+ messages)  latest in thread

Message-ID: <11865.1489679245@sss.pgh.pa.us>
Permalink:  ../11865.1489679245@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/11865.1489679245@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, hlinnaka@iki.fi, tomas.vondra@2ndquadrant.com
  Subject: Re: WIP: Faster Expression Processing v4
  In-Reply-To: <11865.1489679245@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox