Re: Unused parameters & co in code - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Unused parameters & co in code
Date
Msg-id 7117.1548859264@sss.pgh.pa.us
Whole thread Raw
In response to Unused parameters & co in code  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Unused parameters & co in code  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
Michael Paquier <michael@paquier.xyz> writes:
> ... while this generates a lot of noise for callbacks and depending on
> the environment used, this is also pointing to things which could be
> simplified:

I'd definitely take this on a case-by-case basis.  In the planner
functions you mentioned, for instance, I'd be pretty hesitant to remove
the "root" parameter even if it happens not to be needed today.
We'd probably just end up putting it back in the future, because almost
everything in the planner needs that.  I'd only consider removing it in
cases where there was a solid reason to require the function not to need
it ever (as for instance what I just did to flatten_join_alias_vars).

In cases where we can get simplifications of calling layers, and
it doesn't seem likely that we'd have to undo it in future, then
probably it's worth the trouble to change.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Replication & recovery_min_apply_delay
Next
From: John Naylor
Date:
Subject: Re: WIP: Avoid creation of the free space map for small tables