Redundant parameter in the get_useful_pathkeys_for_relation

Started by Andrei Lepikhovover 1 year ago1 messageshackers

Thread notes

1 note#refactor
hackorum-bot#refactor
hackorum-bot
1 day ago

@global #refactor

#refactor
Jump to latest
#1Andrei Lepikhov
lepihov@gmail.com

Hi,

Working on an unrelated project, I found that the
get_useful_pathkeys_for_relation routine has redundant parameter
'require_parallel_safe'. This routine is static and is called only once
with the 'true' value. Hence, it is evident that this parameter is a
redundant one. The thread [1]/messages/by-id/CAAaqYe8cK3g5CfLC4w7bs=hC0mSksZC=H5M8LSchj5e5OxpTAg@mail.gmail.com seems not to explain why it is necessary.
Although this function may be reused someday, I propose to remove this
parameter or, at least, clarify why it is required here.
I would also remove the same parameter from the interface of routine
relation_can_be_sorted_early, but it is exported, and someone may
already use it in a loadable module.

See the patch attached.

[1]: /messages/by-id/CAAaqYe8cK3g5CfLC4w7bs=hC0mSksZC=H5M8LSchj5e5OxpTAg@mail.gmail.com
/messages/by-id/CAAaqYe8cK3g5CfLC4w7bs=hC0mSksZC=H5M8LSchj5e5OxpTAg@mail.gmail.com

--
regards, Andrei Lepikhov

Attachments:

t52167_1
0001-Remove-redundant-parameter-from-get_useful_pathkeys_.patchtext/plain; charset=UTF-8; name=0001-Remove-redundant-parameter-from-get_useful_pathkeys_.patchDownload+6-9