Remove redundant AttStatsSlot initialization in eqjoinsel()

Chao Li <li.evan.chao@gmail.com>

From: Chao Li <li.evan.chao@gmail.com>
To: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-12-29T08:59:48Z
Lists: pgsql-hackers

Attachments

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().

[1] https://postgr.es/m/2380165.1766871097@sss.pgh.pa.us

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