public inbox for [email protected]
help / color / mirror / Atom feedFrom: Ilia Evdokimov <[email protected]>
To: pgsql-hackers <[email protected]>
Subject: Remove vardata parameters from eqjoinsel_inner
Date: Fri, 21 Feb 2025 13:04:21 +0300
Message-ID: <[email protected]> (raw)
Hi hackers,
When calculating selectivity for an inner equijoin, we call
eqjoinsel_inner, which uses unused parameters vardata1 and vardata2.
These parameters might have been left behind accidentally when we moved
getting sslots out of the function. I suggest removing them, as they can
be added back at any time if needed. I attached patch with fixes.
--
Best regards,
Ilia Evdokimov,
Tantor Labs LLC.
Attachments:
[text/x-patch] v1-0001-Remove-unused-vardata-parameters-in-eqjoinsel_inner.patch (1.6K, ../[email protected]/2-v1-0001-Remove-unused-vardata-parameters-in-eqjoinsel_inner.patch)
download | inline diff:
From 1bf58c5725ab9a906f57117a2c2e1ee7f287f5d5 Mon Sep 17 00:00:00 2001
From: Ilia Evdokimov <[email protected]>
Date: Fri, 21 Feb 2025 12:38:13 +0300
Subject: [PATCH v1] Remove unused vardata parameters in eqjoinsel_inner.
The vardata parameters in eqjoinsel_inner are unused, so remove them.
This is a static function, so the parameters can easily be added again if
they are ever needed.
---
src/backend/utils/adt/selfuncs.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c
index c2918c9c83..63b408bdcc 100644
--- a/src/backend/utils/adt/selfuncs.c
+++ b/src/backend/utils/adt/selfuncs.c
@@ -150,7 +150,6 @@ get_index_stats_hook_type get_index_stats_hook = NULL;
static double eqsel_internal(PG_FUNCTION_ARGS, bool negate);
static double eqjoinsel_inner(Oid opfuncoid, Oid collation,
- VariableStatData *vardata1, VariableStatData *vardata2,
double nd1, double nd2,
bool isdefault1, bool isdefault2,
AttStatsSlot *sslot1, AttStatsSlot *sslot2,
@@ -2348,7 +2347,6 @@ eqjoinsel(PG_FUNCTION_ARGS)
/* We need to compute the inner-join selectivity in all cases */
selec_inner = eqjoinsel_inner(opfuncoid, collation,
- &vardata1, &vardata2,
nd1, nd2,
isdefault1, isdefault2,
&sslot1, &sslot2,
@@ -2436,7 +2434,6 @@ eqjoinsel(PG_FUNCTION_ARGS)
*/
static double
eqjoinsel_inner(Oid opfuncoid, Oid collation,
- VariableStatData *vardata1, VariableStatData *vardata2,
double nd1, double nd2,
bool isdefault1, bool isdefault2,
AttStatsSlot *sslot1, AttStatsSlot *sslot2,
--
2.34.1
view thread (5+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: Remove vardata parameters from eqjoinsel_inner
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox