Clean up cpluspluscheck violation.
authorTom Lane <[email protected]>
Tue, 21 Apr 2020 15:21:15 +0000 (11:21 -0400)
committerTom Lane <[email protected]>
Tue, 21 Apr 2020 15:21:15 +0000 (11:21 -0400)
"operator" is a reserved word in C++, so per project conventions,
don't use it as an identifier in header files.

My oversight in commit a80818605.

src/backend/utils/adt/selfuncs.c
src/include/utils/selfuncs.h

index 4fdcb07d97bcdd745641b89f79fa19a1ea7a37bb..ae08a59d2b82933b29a33e08259039f1e3b63cf0 100644 (file)
@@ -848,7 +848,7 @@ histogram_selectivity(VariableStatData *vardata, FmgrInfo *opproc,
  * Otherwise, fall back to the default selectivity provided by the caller.
  */
 double
-generic_restriction_selectivity(PlannerInfo *root, Oid operator,
+generic_restriction_selectivity(PlannerInfo *root, Oid oproid,
                                                                List *args, int varRelid,
                                                                double default_selectivity)
 {
@@ -886,7 +886,7 @@ generic_restriction_selectivity(PlannerInfo *root, Oid operator,
                double          nullfrac;
                int                     hist_size;
 
-               fmgr_info(get_opcode(operator), &opproc);
+               fmgr_info(get_opcode(oproid), &opproc);
 
                /*
                 * Calculate the selectivity for the column's most common values.
index 1dd3ac12f8bda5431fb0e35612e89064847fbe21..9690b4e48652e2ae306c9afdbec3fa4c71112dbe 100644 (file)
@@ -151,7 +151,7 @@ extern double histogram_selectivity(VariableStatData *vardata, FmgrInfo *opproc,
                                                                        Datum constval, bool varonleft,
                                                                        int min_hist_size, int n_skip,
                                                                        int *hist_size);
-extern double generic_restriction_selectivity(PlannerInfo *root, Oid operator,
+extern double generic_restriction_selectivity(PlannerInfo *root, Oid oproid,
                                                                                          List *args, int varRelid,
                                                                                          double default_selectivity);
 extern double ineq_histogram_selectivity(PlannerInfo *root,