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

From Tom Lane
Subject Re: [HACKERS] [sqlsmith] Planner crash on foreign table join
Date
Msg-id 1513.1491685756@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] [sqlsmith] Planner crash on foreign table join  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Responses Adding lfirst_node (was Re: [HACKERS] [sqlsmith] Planner crash on foreign table join)
List pgsql-hackers
Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:
>  Tom> Experimentation shows that actually, the standard regression tests
>  Tom> provide dozens of opportunities for find_relation_from_clauses to
>  Tom> 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)))

That seems like a fairly good idea.  A significant fraction of the
existing castNode() calls are being applied to lfirst(something),
and this would shorten that idiom a bit.

There's another noticeable fraction that are being applied to
linitial(something), but I'm not sure if defining linitial_node()
is worth the trouble.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] [sqlsmith] Planner crash on foreign table join
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] [sqlsmith] Planner crash on foreign table join