Fix recent cpluspluscheck issue in selfuncs.h.
authorPeter Geoghegan <pg@bowt.ie>
Tue, 20 Sep 2022 21:08:57 +0000 (14:08 -0700)
committerPeter Geoghegan <pg@bowt.ie>
Tue, 20 Sep 2022 21:08:57 +0000 (14:08 -0700)
Fix selfuncs.h cpluspluscheck complaint, without reintroducing a
parameter name inconsistency (restore the original declaration names,
and then make corresponding function definitions consistent with that).

Oversight in commit a601366a.

Author: Peter Geoghegan <pg@bowt.ie>
Reported-By: Andres Freund <andres@anarazel.de>
src/backend/utils/adt/selfuncs.c
src/include/utils/selfuncs.h

index c746759eef4f21a0e4e149f0cfe450cc28a57f52..1808388397a8be4e50652ec97fc9d299bb341b3f 100644 (file)
@@ -290,7 +290,7 @@ eqsel_internal(PG_FUNCTION_ARGS, bool negate)
  * This is exported so that some other estimation functions can use it.
  */
 double
-var_eq_const(VariableStatData *vardata, Oid operator, Oid collation,
+var_eq_const(VariableStatData *vardata, Oid oproid, Oid collation,
             Datum constval, bool constisnull,
             bool varonleft, bool negate)
 {
@@ -331,7 +331,7 @@ var_eq_const(VariableStatData *vardata, Oid operator, Oid collation,
    }
    else if (HeapTupleIsValid(vardata->statsTuple) &&
             statistic_proc_security_check(vardata,
-                                          (opfuncoid = get_opcode(operator))))
+                                          (opfuncoid = get_opcode(oproid))))
    {
        AttStatsSlot sslot;
        bool        match = false;
@@ -461,7 +461,7 @@ var_eq_const(VariableStatData *vardata, Oid operator, Oid collation,
  * This is exported so that some other estimation functions can use it.
  */
 double
-var_eq_non_const(VariableStatData *vardata, Oid operator, Oid collation,
+var_eq_non_const(VariableStatData *vardata, Oid oproid, Oid collation,
                 Node *other,
                 bool varonleft, bool negate)
 {
index 49af4ed2ede7498b86a22a63896aaab45d293fcf..d485b9bfcd9cfcfaad216c6bb00daa2c36f4bf45 100644 (file)
@@ -181,11 +181,11 @@ extern double ineq_histogram_selectivity(PlannerInfo *root,
                                         Oid collation,
                                         Datum constval, Oid consttype);
 extern double var_eq_const(VariableStatData *vardata,
-                          Oid operator, Oid collation,
+                          Oid oproid, Oid collation,
                           Datum constval, bool constisnull,
                           bool varonleft, bool negate);
 extern double var_eq_non_const(VariableStatData *vardata,
-                              Oid operator, Oid collation,
+                              Oid oproid, Oid collation,
                               Node *other,
                               bool varonleft, bool negate);