Re: [HACKERS] [sqlsmith] Planner crash on foreign table join - Mailing list pgsql-hackers

From Andrew Gierth
Subject Re: [HACKERS] [sqlsmith] Planner crash on foreign table join
Date
Msg-id 87y3vawt0o.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Re: [HACKERS] [sqlsmith] Planner crash on foreign table join  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] [sqlsmith] Planner crash on foreign table join  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [HACKERS] [sqlsmith] Planner crash on foreign table join  (Thomas Munro <thomas.munro@enterprisedb.com>)
List pgsql-hackers
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:
Tom> Experimentation shows that actually, the standard regression testsTom> provide dozens of opportunities for
find_relation_from_clausestoTom> fail on non-RestrictInfo input.  However, it lacks any IsA check,
 

In a discussion with Andres on the hash grouping sets review thread, I
proposed that we should have something of the form

#define lfirst_node(_type_, l) (castNode(_type_,lfirst(l)))

to replace the current idiom of
   foreach(l, blah)   {       SomeType *x = (SomeType *) lfirst(l);

(in my code I tend to omit the (SomeType *), which I dislike because it
adds no real protection)

by
   foreach(l, blah)   {       SomeType *x = lfirst_node(SomeType, l);

in order to get that IsA check in there in a convenient way.

-- 
Andrew (irc:RhodiumToad)



pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: [HACKERS] pgbench - allow to store select results intovariables
Next
From: Fabien COELHO
Date:
Subject: Re: [HACKERS] pgbench - allow to store select results intovariables