Re: [HACKERS] safer node casting - Mailing list pgsql-hackers

From Andres Freund
Subject Re: [HACKERS] safer node casting
Date
Msg-id 20170126211541.auhepsrwhapvbgig@alap3.anarazel.de
Whole thread Raw
In response to Re: [HACKERS] safer node casting  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] safer node casting  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [HACKERS] safer node casting  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
On 2017-01-25 19:21:40 -0500, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > On 2016-12-31 12:08:22 -0500, Peter Eisentraut wrote:
> >> RestrictInfo *rinfo = castNode(RestrictInfo, lfirst(lc));
>
> > Are you planning to add this / update this patch? Because I really would
> > have liked this a number of times already...  I can update it according
> > to my suggestions (to avoid multiple eval scenarios) if helpful
>
> Yeah, I'd like that in sooner rather than later, too.  But we do need
> it to be foolproof - no multiple evals.  The first draft had
> inadequate-parenthesization hazards,

How about something like the attached? The first patch just contains
castNode(), the second one a rebased version of Peter's changes (with
some long lines broken up).

Andres

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachment

pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: [HACKERS] Performance improvement for joins where outer side is unique
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Failure in commit_ts tap tests