From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Unused member root in foreign_glob_cxt |
Date: | 2017-01-12 13:09:02 |
Message-ID: | 29897.1484226542@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com> writes:
> The member root in foreign_glob_cxt isn't used anywhere by
> postgres_fdw code. Without that member the code compiles and
> regression passes. The member was added by d0d75c40. I looked at that
> commit briefly but did not find any code using it there. So, possibly
> it's unused since it was introduced. Should we drop that member?
I think you'd just end up putting it back at some point. It's the only
means that foreign_expr_walker() has for getting at the root pointer,
and nearly all planner code needs that. Seems to me it's just chance
that foreign_expr_walker() doesn't need it right now.
> PFA the patch to remove that member. If we decide to drop that member,
> we can drop root argument to is_foreign_expr() and clean up some more
> code. I volunteer to do that, if we agree.
That would *really* be doubling down on the assumption that
is_foreign_expr() will never ever need access to the root.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Kyotaro HORIGUCHI | 2017-01-12 13:12:33 | Re: BUG: pg_stat_statements query normalization issues with combined queries |
Previous Message | Andrew Dunstan | 2017-01-12 13:02:33 | Re: Retiring from the Core Team |