Remove redundant AttStatsSlot initialization in eqjoinsel() - Mailing list pgsql-hackers

From Chao Li
Subject Remove redundant AttStatsSlot initialization in eqjoinsel()
Date
Msg-id CAEoWx2kfWifbgfyjZwb0HzUZ8QC5+pj-6RCqE6xH6Xg6SCyprA@mail.gmail.com
Whole thread Raw
List pgsql-hackers
Hi Hackers,

I noticed this problem while reviewing Tom’s patch [1]. The function eqjoinsel() unnecessarily zero-out sslot1 and sslot2 before calling get_attstatsslot() because get_attstatsslot() will unconditionally zero-out sslot in the first place.

I searched over the source tree, none of other callers of get_attstatsslot() initialize sslot. So for consistency, we should remove the unnecessary zero-out from eqjoinsel().


Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/




Attachment

pgsql-hackers by date:

Previous
From: Bertrand Drouvot
Date:
Subject: Re: More const-marking cleanup
Next
From: Bertrand Drouvot
Date:
Subject: Re: Don't cast away const where possible