Re: [HACKERS] WIP patch: distinguish selectivity of < from <= and > from >= - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] WIP patch: distinguish selectivity of < from <= and > from >=
Date
Msg-id 29667.1499292924@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] WIP patch: distinguish selectivity of < from <= and > from >=  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] WIP patch: distinguish selectivity of < from <= and >from >=
List pgsql-hackers
I wrote:
> (Pokes at it some more...) Oh, interesting: it behaves that way except
> when p is exactly the lowest histogram entry.

Here's a revised version that addresses that point and cleans up some
other minor details about treatment of cases near the histogram endpoints.
I'm still pretty unclear on exactly why it works (see XXX comments in
patch), but testing shows that it does work very well indeed given a flat
data distribution.  On less-flat distributions, you get some estimation
errors, but that's neither new nor surprising.

            regards, tom lane

diff --git a/doc/src/sgml/xindex.sgml b/doc/src/sgml/xindex.sgml
index 333a36c..e9ff110 100644
--- a/doc/src/sgml/xindex.sgml
+++ b/doc/src/sgml/xindex.sgml
@@ -792,8 +792,7 @@ CREATE OPERATOR < (
    It is important to specify the correct commutator and negator operators,
    as well as suitable restriction and join selectivity
    functions, otherwise the optimizer will be unable to make effective
-   use of the index.  Note that the less-than, equal, and
-   greater-than cases should use different selectivity functions.
+   use of the index.
   </para>

   <para>
diff --git a/doc/src/sgml/xoper.sgml b/doc/src/sgml/xoper.sgml
index 8568e21..d484d80 100644
--- a/doc/src/sgml/xoper.sgml
+++ b/doc/src/sgml/xoper.sgml
@@ -242,20 +242,11 @@ column OP constant
     <simplelist>
      <member><function>eqsel</> for <literal>=</></member>
      <member><function>neqsel</> for <literal><></></member>
-     <member><function>scalarltsel</> for <literal><</> or <literal><=</></member>
-     <member><function>scalargtsel</> for <literal>></> or <literal>>=</></member>
-   </simplelist>
-    It might seem a little odd that these are the categories, but they
-    make sense if you think about it.  <literal>=</> will typically accept only
-    a small fraction of the rows in a table; <literal><></> will typically reject
-    only a small fraction.  <literal><</> will accept a fraction that depends on
-    where the given constant falls in the range of values for that table
-    column (which, it just so happens, is information collected by
-    <command>ANALYZE</command> and made available to the selectivity estimator).
-    <literal><=</> will accept a slightly larger fraction than <literal><</> for the same
-    comparison constant, but they're close enough to not be worth
-    distinguishing, especially since we're not likely to do better than a
-    rough guess anyhow.  Similar remarks apply to <literal>></> and <literal>>=</>.
+     <member><function>scalarltsel</> for <literal><</></member>
+     <member><function>scalarlesel</> for <literal><=</></member>
+     <member><function>scalargtsel</> for <literal>></></member>
+     <member><function>scalargesel</> for <literal>>=</></member>
+    </simplelist>
    </para>

    <para>
@@ -267,10 +258,12 @@ column OP constant
    </para>

    <para>
-    You can use <function>scalarltsel</> and <function>scalargtsel</> for comparisons on data types that
-    have some sensible means of being converted into numeric scalars for
-    range comparisons.  If possible, add the data type to those understood
-    by the function <function>convert_to_scalar()</function> in <filename>src/backend/utils/adt/selfuncs.c</filename>.
+    You can use <function>scalarltsel</>, <function>scalarlesel</>,
+    <function>scalargtsel</> and <function>scalargesel</> for comparisons on
+    data types that have some sensible means of being converted into numeric
+    scalars for range comparisons.  If possible, add the data type to those
+    understood by the function <function>convert_to_scalar()</function> in
+    <filename>src/backend/utils/adt/selfuncs.c</filename>.
     (Eventually, this function should be replaced by per-data-type functions
     identified through a column of the <classname>pg_type</> system catalog; but that hasn't happened
     yet.)  If you do not do this, things will still work, but the optimizer's
@@ -310,8 +303,10 @@ table1.column1 OP table2.column2
      <simplelist>
       <member><function>eqjoinsel</> for <literal>=</></member>
       <member><function>neqjoinsel</> for <literal><></></member>
-      <member><function>scalarltjoinsel</> for <literal><</> or <literal><=</></member>
-      <member><function>scalargtjoinsel</> for <literal>></> or <literal>>=</></member>
+      <member><function>scalarltjoinsel</> for <literal><</></member>
+      <member><function>scalarlejoinsel</> for <literal><=</></member>
+      <member><function>scalargtjoinsel</> for <literal>></></member>
+      <member><function>scalargejoinsel</> for <literal>>=</></member>
       <member><function>areajoinsel</> for 2D area-based comparisons</member>
       <member><function>positionjoinsel</> for 2D position-based comparisons</member>
       <member><function>contjoinsel</> for 2D containment-based comparisons</member>
diff --git a/src/backend/optimizer/path/clausesel.c b/src/backend/optimizer/path/clausesel.c
index 9d34025..b4cbc34 100644
--- a/src/backend/optimizer/path/clausesel.c
+++ b/src/backend/optimizer/path/clausesel.c
@@ -71,7 +71,7 @@ static RelOptInfo *find_single_rel_for_clauses(PlannerInfo *root,
  *
  * We also recognize "range queries", such as "x > 34 AND x < 42".  Clauses
  * are recognized as possible range query components if they are restriction
- * opclauses whose operators have scalarltsel() or scalargtsel() as their
+ * opclauses whose operators have scalarltsel or a related function as their
  * restriction selectivity estimator.  We pair up clauses of this form that
  * refer to the same variable.  An unpairable clause of this kind is simply
  * multiplied into the selectivity product in the normal way.  But when we
@@ -92,8 +92,8 @@ static RelOptInfo *find_single_rel_for_clauses(PlannerInfo *root,
  * A free side-effect is that we can recognize redundant inequalities such
  * as "x < 4 AND x < 5"; only the tighter constraint will be counted.
  *
- * Of course this is all very dependent on the behavior of
- * scalarltsel/scalargtsel; perhaps some day we can generalize the approach.
+ * Of course this is all very dependent on the behavior of the inequality
+ * selectivity functions; perhaps some day we can generalize the approach.
  */
 Selectivity
 clauselist_selectivity(PlannerInfo *root,
@@ -218,17 +218,19 @@ clauselist_selectivity(PlannerInfo *root,
             if (ok)
             {
                 /*
-                 * If it's not a "<" or ">" operator, just merge the
+                 * If it's not a "<"/"<="/">"/">=" operator, just merge the
                  * selectivity in generically.  But if it's the right oprrest,
                  * add the clause to rqlist for later processing.
                  */
                 switch (get_oprrest(expr->opno))
                 {
                     case F_SCALARLTSEL:
+                    case F_SCALARLESEL:
                         addRangeClause(&rqlist, clause,
                                        varonleft, true, s2);
                         break;
                     case F_SCALARGTSEL:
+                    case F_SCALARGESEL:
                         addRangeClause(&rqlist, clause,
                                        varonleft, false, s2);
                         break;
@@ -368,7 +370,7 @@ addRangeClause(RangeQueryClause **rqlist, Node *clause,

                 /*------
                  * We have found two similar clauses, such as
-                 * x < y AND x < z.
+                 * x < y AND x <= z.
                  * Keep only the more restrictive one.
                  *------
                  */
@@ -388,7 +390,7 @@ addRangeClause(RangeQueryClause **rqlist, Node *clause,

                 /*------
                  * We have found two similar clauses, such as
-                 * x > y AND x > z.
+                 * x > y AND x >= z.
                  * Keep only the more restrictive one.
                  *------
                  */
diff --git a/src/backend/utils/adt/network.c b/src/backend/utils/adt/network.c
index 5573c34..322c131 100644
--- a/src/backend/utils/adt/network.c
+++ b/src/backend/utils/adt/network.c
@@ -947,8 +947,8 @@ convert_network_to_scalar(Datum value, Oid typid)
     }

     /*
-     * Can't get here unless someone tries to use scalarltsel/scalargtsel on
-     * an operator with one network and one non-network operand.
+     * Can't get here unless someone tries to use scalarineqsel() on an
+     * operator with one network and one non-network operand.
      */
     elog(ERROR, "unsupported type: %u", typid);
     return 0;
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c
index e103f5e..04239eb 100644
--- a/src/backend/utils/adt/selfuncs.c
+++ b/src/backend/utils/adt/selfuncs.c
@@ -163,7 +163,7 @@ static double var_eq_non_const(VariableStatData *vardata, Oid operator,
                  bool varonleft, bool negate);
 static double ineq_histogram_selectivity(PlannerInfo *root,
                            VariableStatData *vardata,
-                           FmgrInfo *opproc, bool isgt,
+                           FmgrInfo *opproc, bool isgt, bool iseq,
                            Datum constval, Oid consttype);
 static double eqjoinsel_inner(Oid operator,
                 VariableStatData *vardata1, VariableStatData *vardata2);
@@ -544,18 +544,21 @@ neqsel(PG_FUNCTION_ARGS)
 /*
  *    scalarineqsel        - Selectivity of "<", "<=", ">", ">=" for scalars.
  *
- * This is the guts of both scalarltsel and scalargtsel.  The caller has
- * commuted the clause, if necessary, so that we can treat the variable as
- * being on the left.  The caller must also make sure that the other side
- * of the clause is a non-null Const, and dissect same into a value and
- * datatype.
+ * This is the guts of scalarltsel/scalarlesel/scalargtsel/scalargesel.
+ * The isgt and iseq flags distinguish which of the four cases apply.
+ *
+ * The caller has commuted the clause, if necessary, so that we can treat
+ * the variable as being on the left.  The caller must also make sure that
+ * the other side of the clause is a non-null Const, and dissect that into
+ * a value and datatype.  (This definition simplifies some callers that
+ * want to estimate against a constructed value instead of a Const node.)
  *
  * This routine works for any datatype (or pair of datatypes) known to
  * convert_to_scalar().  If it is applied to some other datatype,
  * it will return a default estimate.
  */
 static double
-scalarineqsel(PlannerInfo *root, Oid operator, bool isgt,
+scalarineqsel(PlannerInfo *root, Oid operator, bool isgt, bool iseq,
               VariableStatData *vardata, Datum constval, Oid consttype)
 {
     Form_pg_statistic stats;
@@ -587,7 +590,8 @@ scalarineqsel(PlannerInfo *root, Oid operator, bool isgt,
      * If there is a histogram, determine which bin the constant falls in, and
      * compute the resulting contribution to selectivity.
      */
-    hist_selec = ineq_histogram_selectivity(root, vardata, &opproc, isgt,
+    hist_selec = ineq_histogram_selectivity(root, vardata,
+                                            &opproc, isgt, iseq,
                                             constval, consttype);

     /*
@@ -757,7 +761,8 @@ histogram_selectivity(VariableStatData *vardata, FmgrInfo *opproc,
  *    ineq_histogram_selectivity    - Examine the histogram for scalarineqsel
  *
  * Determine the fraction of the variable's histogram population that
- * satisfies the inequality condition, ie, VAR < CONST or VAR > CONST.
+ * satisfies the inequality condition, ie, VAR < (or <=, >, >=) CONST.
+ * The isgt and iseq flags distinguish which of the four cases apply.
  *
  * Returns -1 if there is no histogram (valid results will always be >= 0).
  *
@@ -768,7 +773,7 @@ histogram_selectivity(VariableStatData *vardata, FmgrInfo *opproc,
 static double
 ineq_histogram_selectivity(PlannerInfo *root,
                            VariableStatData *vardata,
-                           FmgrInfo *opproc, bool isgt,
+                           FmgrInfo *opproc, bool isgt, bool iseq,
                            Datum constval, Oid consttype)
 {
     double        hist_selec;
@@ -795,11 +800,17 @@ ineq_histogram_selectivity(PlannerInfo *root,
         if (sslot.nvalues > 1)
         {
             /*
-             * Use binary search to find proper location, ie, the first slot
-             * at which the comparison fails.  (If the given operator isn't
-             * actually sort-compatible with the histogram, you'll get garbage
-             * results ... but probably not any more garbage-y than you would
-             * from the old linear search.)
+             * Use binary search to find the desired location, namely the
+             * right end of the histogram bin containing the comparison value,
+             * which is the leftmost entry for which the comparison operator
+             * succeeds (if isgt) or fails (if !isgt).  (If the given operator
+             * isn't actually sort-compatible with the histogram, you'll get
+             * garbage results ... but probably not any more garbage-y than
+             * you would have from the old linear search.)
+             *
+             * In this loop, we pay no attention to whether the operator iseq
+             * or not; that detail will be mopped up below.  (We cannot tell,
+             * anyway, whether the operator thinks the values are equal.)
              *
              * If the binary search accesses the first or last histogram
              * entry, we try to replace that endpoint with the true column min
@@ -864,25 +875,65 @@ ineq_histogram_selectivity(PlannerInfo *root,

             if (lobound <= 0)
             {
-                /* Constant is below lower histogram boundary. */
+                /* Constant is <= lower histogram boundary. */
                 histfrac = 0.0;
             }
             else if (lobound >= sslot.nvalues)
             {
-                /* Constant is above upper histogram boundary. */
+                /* Constant is >= upper histogram boundary. */
                 histfrac = 1.0;
             }
             else
             {
+                /* We have values[i-1] <= constant <= values[i]. */
                 int            i = lobound;
+                double        eq_selec = 0;
                 double        val,
                             high,
                             low;
                 double        binfrac;

                 /*
-                 * We have values[i-1] <= constant <= values[i].
+                 * In the cases where we'll need it below, obtain an estimate
+                 * of the selectivity of "x = constval".  We use a calculation
+                 * similar to what var_eq_const() does for a non-MCV constant,
+                 * ie, estimate that all distinct non-MCV values occur equally
+                 * often.  But multiplication by "1.0 - sumcommon - nullfrac"
+                 * will be done by our caller, so we shouldn't do that here.
+                 * Therefore we can't try to clamp the estimate by reference
+                 * to the least common MCV; the result would be too small.
                  *
+                 * Note: since this is effectively assuming that constval
+                 * isn't an MCV, it's logically dubious if constval in fact is
+                 * one.  But we have to apply *some* correction for equality,
+                 * and anyway we cannot tell if constval is an MCV, since we
+                 * don't have a suitable equality operator at hand.
+                 */
+                if (i == 1 || isgt == iseq)
+                {
+                    double        otherdistinct;
+                    bool        isdefault;
+                    AttStatsSlot mcvslot;
+
+                    /* Get estimated number of distinct values */
+                    otherdistinct = get_variable_numdistinct(vardata,
+                                                             &isdefault);
+
+                    /* Subtract off the number of known MCVs */
+                    if (get_attstatsslot(&mcvslot, vardata->statsTuple,
+                                         STATISTIC_KIND_MCV, InvalidOid,
+                                         ATTSTATSSLOT_NUMBERS))
+                    {
+                        otherdistinct -= mcvslot.nnumbers;
+                        free_attstatsslot(&mcvslot);
+                    }
+
+                    /* If result doesn't seem sane, leave eq_selec at 0 */
+                    if (otherdistinct > 1)
+                        eq_selec = 1.0 / otherdistinct;
+                }
+
+                /*
                  * Convert the constant and the two nearest bin boundary
                  * values to a uniform comparison scale, and do a linear
                  * interpolation within this bin.
@@ -936,13 +987,38 @@ ineq_histogram_selectivity(PlannerInfo *root,
                  */
                 histfrac = (double) (i - 1) + binfrac;
                 histfrac /= (double) (sslot.nvalues - 1);
+
+                /*
+                 * In the first bin (i==1), add a fudge factor that ensures
+                 * that histfrac is at least eq_selec.  We do this because we
+                 * know that the first histogram entry does satisfy the
+                 * inequality (if !isgt) or not satisfy it (if isgt), so our
+                 * estimate here should certainly not be zero even if binfrac
+                 * is zero.  (XXX experimentally this is the correct way to do
+                 * it, but why isn't it a linear adjustment across the whole
+                 * histogram rather than just the first bin?)
+                 */
+                if (i == 1)
+                    histfrac += eq_selec * (1.0 - binfrac);
+
+                /*
+                 * At this point, histfrac is an estimate of the fraction of
+                 * the population represented by the histogram that satisfies
+                 * "x <= constval".  (Somewhat remarkably, this statement is
+                 * correct regardless of which operator we were doing the
+                 * probes with.  XXX explain why)
+                 *
+                 * So that's fine if we want an estimate for "<=" or ">", but
+                 * if we are estimating for "<" or ">=", we now need to
+                 * decrease the estimate by eq_selec.
+                 */
+                if (isgt == iseq)
+                    histfrac -= eq_selec;
             }

             /*
-             * Now histfrac = fraction of histogram entries below the
-             * constant.
-             *
-             * Account for "<" vs ">"
+             * Now the estimate is finished for "<" and "<=" cases.  If we are
+             * estimating for ">" or ">=", flip it.
              */
             hist_selec = isgt ? (1.0 - histfrac) : histfrac;

@@ -950,16 +1026,20 @@ ineq_histogram_selectivity(PlannerInfo *root,
              * The histogram boundaries are only approximate to begin with,
              * and may well be out of date anyway.  Therefore, don't believe
              * extremely small or large selectivity estimates --- unless we
-             * got actual current endpoint values from the table.
+             * got actual current endpoint values from the table.  Somewhat
+             * arbitrarily, we set the cutoff at a hundredth of the histogram
+             * resolution.
              */
             if (have_end)
                 CLAMP_PROBABILITY(hist_selec);
             else
             {
-                if (hist_selec < 0.0001)
-                    hist_selec = 0.0001;
-                else if (hist_selec > 0.9999)
-                    hist_selec = 0.9999;
+                double        cutoff = 0.01 / (double) (sslot.nvalues - 1);
+
+                if (hist_selec < cutoff)
+                    hist_selec = cutoff;
+                else if (hist_selec > 1.0 - cutoff)
+                    hist_selec = 1.0 - cutoff;
             }
         }

@@ -970,10 +1050,11 @@ ineq_histogram_selectivity(PlannerInfo *root,
 }

 /*
- *        scalarltsel        - Selectivity of "<" (also "<=") for scalars.
+ * Common wrapper function for the selectivity estimators that simply
+ * invoke scalarineqsel().
  */
-Datum
-scalarltsel(PG_FUNCTION_ARGS)
+static Datum
+scalarineqsel_wrapper(PG_FUNCTION_ARGS, bool isgt, bool iseq)
 {
     PlannerInfo *root = (PlannerInfo *) PG_GETARG_POINTER(0);
     Oid            operator = PG_GETARG_OID(1);
@@ -984,7 +1065,6 @@ scalarltsel(PG_FUNCTION_ARGS)
     bool        varonleft;
     Datum        constval;
     Oid            consttype;
-    bool        isgt;
     double        selec;

     /*
@@ -1019,14 +1099,8 @@ scalarltsel(PG_FUNCTION_ARGS)
     /*
      * Force the var to be on the left to simplify logic in scalarineqsel.
      */
-    if (varonleft)
-    {
-        /* we have var < other */
-        isgt = false;
-    }
-    else
+    if (!varonleft)
     {
-        /* we have other < var, commute to make var > other */
         operator = get_commutator(operator);
         if (!operator)
         {
@@ -1034,10 +1108,12 @@ scalarltsel(PG_FUNCTION_ARGS)
             ReleaseVariableStats(vardata);
             PG_RETURN_FLOAT8(DEFAULT_INEQ_SEL);
         }
-        isgt = true;
+        isgt = !isgt;
     }

-    selec = scalarineqsel(root, operator, isgt, &vardata, constval, consttype);
+    /* The rest of the work is done by scalarineqsel(). */
+    selec = scalarineqsel(root, operator, isgt, iseq,
+                          &vardata, constval, consttype);

     ReleaseVariableStats(vardata);

@@ -1045,78 +1121,39 @@ scalarltsel(PG_FUNCTION_ARGS)
 }

 /*
- *        scalargtsel        - Selectivity of ">" (also ">=") for integers.
+ *        scalarltsel        - Selectivity of "<" for scalars.
  */
 Datum
-scalargtsel(PG_FUNCTION_ARGS)
+scalarltsel(PG_FUNCTION_ARGS)
 {
-    PlannerInfo *root = (PlannerInfo *) PG_GETARG_POINTER(0);
-    Oid            operator = PG_GETARG_OID(1);
-    List       *args = (List *) PG_GETARG_POINTER(2);
-    int            varRelid = PG_GETARG_INT32(3);
-    VariableStatData vardata;
-    Node       *other;
-    bool        varonleft;
-    Datum        constval;
-    Oid            consttype;
-    bool        isgt;
-    double        selec;
-
-    /*
-     * If expression is not variable op something or something op variable,
-     * then punt and return a default estimate.
-     */
-    if (!get_restriction_variable(root, args, varRelid,
-                                  &vardata, &other, &varonleft))
-        PG_RETURN_FLOAT8(DEFAULT_INEQ_SEL);
-
-    /*
-     * Can't do anything useful if the something is not a constant, either.
-     */
-    if (!IsA(other, Const))
-    {
-        ReleaseVariableStats(vardata);
-        PG_RETURN_FLOAT8(DEFAULT_INEQ_SEL);
-    }
-
-    /*
-     * If the constant is NULL, assume operator is strict and return zero, ie,
-     * operator will never return TRUE.
-     */
-    if (((Const *) other)->constisnull)
-    {
-        ReleaseVariableStats(vardata);
-        PG_RETURN_FLOAT8(0.0);
-    }
-    constval = ((Const *) other)->constvalue;
-    consttype = ((Const *) other)->consttype;
-
-    /*
-     * Force the var to be on the left to simplify logic in scalarineqsel.
-     */
-    if (varonleft)
-    {
-        /* we have var > other */
-        isgt = true;
-    }
-    else
-    {
-        /* we have other > var, commute to make var < other */
-        operator = get_commutator(operator);
-        if (!operator)
-        {
-            /* Use default selectivity (should we raise an error instead?) */
-            ReleaseVariableStats(vardata);
-            PG_RETURN_FLOAT8(DEFAULT_INEQ_SEL);
-        }
-        isgt = false;
-    }
+    return scalarineqsel_wrapper(fcinfo, false, false);
+}

-    selec = scalarineqsel(root, operator, isgt, &vardata, constval, consttype);
+/*
+ *        scalarlesel        - Selectivity of "<=" for scalars.
+ */
+Datum
+scalarlesel(PG_FUNCTION_ARGS)
+{
+    return scalarineqsel_wrapper(fcinfo, false, true);
+}

-    ReleaseVariableStats(vardata);
+/*
+ *        scalargtsel        - Selectivity of ">" for scalars.
+ */
+Datum
+scalargtsel(PG_FUNCTION_ARGS)
+{
+    return scalarineqsel_wrapper(fcinfo, true, false);
+}

-    PG_RETURN_FLOAT8((float8) selec);
+/*
+ *        scalargesel        - Selectivity of ">=" for scalars.
+ */
+Datum
+scalargesel(PG_FUNCTION_ARGS)
+{
+    return scalarineqsel_wrapper(fcinfo, true, true);
 }

 /*
@@ -2721,7 +2758,7 @@ neqjoinsel(PG_FUNCTION_ARGS)
 }

 /*
- *        scalarltjoinsel - Join selectivity of "<" and "<=" for scalars
+ *        scalarltjoinsel - Join selectivity of "<" for scalars
  */
 Datum
 scalarltjoinsel(PG_FUNCTION_ARGS)
@@ -2730,7 +2767,16 @@ scalarltjoinsel(PG_FUNCTION_ARGS)
 }

 /*
- *        scalargtjoinsel - Join selectivity of ">" and ">=" for scalars
+ *        scalarlejoinsel - Join selectivity of "<=" for scalars
+ */
+Datum
+scalarlejoinsel(PG_FUNCTION_ARGS)
+{
+    PG_RETURN_FLOAT8(DEFAULT_INEQ_SEL);
+}
+
+/*
+ *        scalargtjoinsel - Join selectivity of ">" for scalars
  */
 Datum
 scalargtjoinsel(PG_FUNCTION_ARGS)
@@ -2739,6 +2785,15 @@ scalargtjoinsel(PG_FUNCTION_ARGS)
 }

 /*
+ *        scalargejoinsel - Join selectivity of ">=" for scalars
+ */
+Datum
+scalargejoinsel(PG_FUNCTION_ARGS)
+{
+    PG_RETURN_FLOAT8(DEFAULT_INEQ_SEL);
+}
+
+/*
  * patternjoinsel        - Generic code for pattern-match join selectivity.
  */
 static double
@@ -3035,13 +3090,13 @@ mergejoinscansel(PlannerInfo *root, Node *clause,
      * fraction that's <= the right-side maximum value.  But only believe
      * non-default estimates, else stick with our 1.0.
      */
-    selec = scalarineqsel(root, leop, isgt, &leftvar,
+    selec = scalarineqsel(root, leop, isgt, true, &leftvar,
                           rightmax, op_righttype);
     if (selec != DEFAULT_INEQ_SEL)
         *leftend = selec;

     /* And similarly for the right variable. */
-    selec = scalarineqsel(root, revleop, isgt, &rightvar,
+    selec = scalarineqsel(root, revleop, isgt, true, &rightvar,
                           leftmax, op_lefttype);
     if (selec != DEFAULT_INEQ_SEL)
         *rightend = selec;
@@ -3065,13 +3120,13 @@ mergejoinscansel(PlannerInfo *root, Node *clause,
      * minimum value.  But only believe non-default estimates, else stick with
      * our own default.
      */
-    selec = scalarineqsel(root, ltop, isgt, &leftvar,
+    selec = scalarineqsel(root, ltop, isgt, false, &leftvar,
                           rightmin, op_righttype);
     if (selec != DEFAULT_INEQ_SEL)
         *leftstart = selec;

     /* And similarly for the right variable. */
-    selec = scalarineqsel(root, revltop, isgt, &rightvar,
+    selec = scalarineqsel(root, revltop, isgt, false, &rightvar,
                           leftmin, op_lefttype);
     if (selec != DEFAULT_INEQ_SEL)
         *rightstart = selec;
@@ -4012,8 +4067,8 @@ convert_numeric_to_scalar(Datum value, Oid typid)
     }

     /*
-     * Can't get here unless someone tries to use scalarltsel/scalargtsel on
-     * an operator with one numeric and one non-numeric operand.
+     * Can't get here unless someone tries to use scalarineqsel() on an
+     * operator with one numeric and one non-numeric operand.
      */
     elog(ERROR, "unsupported type: %u", typid);
     return 0;
@@ -4194,8 +4249,8 @@ convert_string_datum(Datum value, Oid typid)
         default:

             /*
-             * Can't get here unless someone tries to use scalarltsel on an
-             * operator with one string and one non-string operand.
+             * Can't get here unless someone tries to use scalarineqsel() on
+             * an operator with one string and one non-string operand.
              */
             elog(ERROR, "unsupported type: %u", typid);
             return NULL;
@@ -4399,8 +4454,8 @@ convert_timevalue_to_scalar(Datum value, Oid typid)
     }

     /*
-     * Can't get here unless someone tries to use scalarltsel/scalargtsel on
-     * an operator with one timevalue and one non-timevalue operand.
+     * Can't get here unless someone tries to use scalarineqsel() on an
+     * operator with one timevalue and one non-timevalue operand.
      */
     elog(ERROR, "unsupported type: %u", typid);
     return 0;
@@ -5765,7 +5820,8 @@ prefix_selectivity(PlannerInfo *root, VariableStatData *vardata,
         elog(ERROR, "no >= operator for opfamily %u", opfamily);
     fmgr_info(get_opcode(cmpopr), &opproc);

-    prefixsel = ineq_histogram_selectivity(root, vardata, &opproc, true,
+    prefixsel = ineq_histogram_selectivity(root, vardata,
+                                           &opproc, true, true,
                                            prefixcon->constvalue,
                                            prefixcon->consttype);

@@ -5791,7 +5847,8 @@ prefix_selectivity(PlannerInfo *root, VariableStatData *vardata,
     {
         Selectivity topsel;

-        topsel = ineq_histogram_selectivity(root, vardata, &opproc, false,
+        topsel = ineq_histogram_selectivity(root, vardata,
+                                            &opproc, false, false,
                                             greaterstrcon->constvalue,
                                             greaterstrcon->consttype);

diff --git a/src/include/catalog/pg_operator.h b/src/include/catalog/pg_operator.h
index ffabc20..ff9b470 100644
--- a/src/include/catalog/pg_operator.h
+++ b/src/include/catalog/pg_operator.h
@@ -97,9 +97,9 @@ DATA(insert OID =  37 ( "<"           PGNSP PGUID b f f    23    20    16 419    82 int48lt scalar
 DESCR("less than");
 DATA(insert OID =  76 ( ">"           PGNSP PGUID b f f    23    20    16 418    80 int48gt scalargtsel
scalargtjoinsel)); 
 DESCR("greater than");
-DATA(insert OID =  80 ( "<="       PGNSP PGUID b f f    23    20    16 430    76 int48le scalarltsel scalarltjoinsel
));
+DATA(insert OID =  80 ( "<="       PGNSP PGUID b f f    23    20    16 430    76 int48le scalarlesel scalarlejoinsel
));
 DESCR("less than or equal");
-DATA(insert OID =  82 ( ">="       PGNSP PGUID b f f    23    20    16 420    37 int48ge scalargtsel scalargtjoinsel
));
+DATA(insert OID =  82 ( ">="       PGNSP PGUID b f f    23    20    16 420    37 int48ge scalargesel scalargejoinsel
));
 DESCR("greater than or equal");

 DATA(insert OID =  58 ( "<"           PGNSP PGUID b f f    16    16    16    59    1695 boollt scalarltsel
scalarltjoinsel)); 
@@ -112,9 +112,9 @@ DESCR("not equal");
 DATA(insert OID =  91 ( "="           PGNSP PGUID b t t    16    16    16    91    85 booleq eqsel eqjoinsel ));
 DESCR("equal");
 #define BooleanEqualOperator   91
-DATA(insert OID = 1694 (  "<="       PGNSP PGUID b f f    16    16    16 1695 59 boolle scalarltsel scalarltjoinsel
));
+DATA(insert OID = 1694 (  "<="       PGNSP PGUID b f f    16    16    16 1695 59 boolle scalarlesel scalarlejoinsel
));
 DESCR("less than or equal");
-DATA(insert OID = 1695 (  ">="       PGNSP PGUID b f f    16    16    16 1694 58 boolge scalargtsel scalargtjoinsel
));
+DATA(insert OID = 1695 (  ">="       PGNSP PGUID b f f    16    16    16 1694 58 boolge scalargesel scalargejoinsel
));
 DESCR("greater than or equal");

 DATA(insert OID =  92 ( "="           PGNSP PGUID b t t    18    18    16    92 630 chareq eqsel eqjoinsel ));
@@ -167,9 +167,9 @@ DESCR("less than");
 #define TIDLessOperator    2799
 DATA(insert OID = 2800 (  ">"       PGNSP PGUID b f f    27    27    16 2799 2801 tidgt scalargtsel scalargtjoinsel
));
 DESCR("greater than");
-DATA(insert OID = 2801 (  "<="       PGNSP PGUID b f f    27    27    16 2802 2800 tidle scalarltsel scalarltjoinsel
));
+DATA(insert OID = 2801 (  "<="       PGNSP PGUID b f f    27    27    16 2802 2800 tidle scalarlesel scalarlejoinsel
));
 DESCR("less than or equal");
-DATA(insert OID = 2802 (  ">="       PGNSP PGUID b f f    27    27    16 2801 2799 tidge scalargtsel scalargtjoinsel
));
+DATA(insert OID = 2802 (  ">="       PGNSP PGUID b f f    27    27    16 2801 2799 tidge scalargesel scalargejoinsel
));
 DESCR("greater than or equal");

 DATA(insert OID = 410 ( "="           PGNSP PGUID b t t    20    20    16 410 411 int8eq eqsel eqjoinsel ));
@@ -181,9 +181,9 @@ DESCR("less than");
 #define Int8LessOperator    412
 DATA(insert OID = 413 ( ">"           PGNSP PGUID b f f    20    20    16 412 414 int8gt scalargtsel scalargtjoinsel
));
 DESCR("greater than");
-DATA(insert OID = 414 ( "<="       PGNSP PGUID b f f    20    20    16 415 413 int8le scalarltsel scalarltjoinsel ));
+DATA(insert OID = 414 ( "<="       PGNSP PGUID b f f    20    20    16 415 413 int8le scalarlesel scalarlejoinsel ));
 DESCR("less than or equal");
-DATA(insert OID = 415 ( ">="       PGNSP PGUID b f f    20    20    16 414 412 int8ge scalargtsel scalargtjoinsel ));
+DATA(insert OID = 415 ( ">="       PGNSP PGUID b f f    20    20    16 414 412 int8ge scalargesel scalargejoinsel ));
 DESCR("greater than or equal");

 DATA(insert OID = 416 ( "="           PGNSP PGUID b t t    20    23    16    15 417 int84eq eqsel eqjoinsel ));
@@ -194,9 +194,9 @@ DATA(insert OID = 418 ( "<"           PGNSP PGUID b f f    20    23    16    76 430 int84lt scalar
 DESCR("less than");
 DATA(insert OID = 419 ( ">"           PGNSP PGUID b f f    20    23    16    37 420 int84gt scalargtsel
scalargtjoinsel)); 
 DESCR("greater than");
-DATA(insert OID = 420 ( "<="       PGNSP PGUID b f f    20    23    16    82 419 int84le scalarltsel scalarltjoinsel
));
+DATA(insert OID = 420 ( "<="       PGNSP PGUID b f f    20    23    16    82 419 int84le scalarlesel scalarlejoinsel
));
 DESCR("less than or equal");
-DATA(insert OID = 430 ( ">="       PGNSP PGUID b f f    20    23    16    80 418 int84ge scalargtsel scalargtjoinsel
));
+DATA(insert OID = 430 ( ">="       PGNSP PGUID b f f    20    23    16    80 418 int84ge scalargesel scalargejoinsel
));
 DESCR("greater than or equal");
 DATA(insert OID = 439 (  "%"       PGNSP PGUID b f f    20    20    20     0     0 int8mod - - ));
 DESCR("modulus");
@@ -277,13 +277,13 @@ DATA(insert OID = 520 (  ">"       PGNSP PGUID b f f    21    21    16    95 522 int2gt scalarg
 DESCR("greater than");
 DATA(insert OID = 521 (  ">"       PGNSP PGUID b f f    23    23    16    97 523 int4gt scalargtsel scalargtjoinsel
));
 DESCR("greater than");
-DATA(insert OID = 522 (  "<="       PGNSP PGUID b f f    21    21    16 524 520 int2le scalarltsel scalarltjoinsel ));
+DATA(insert OID = 522 (  "<="       PGNSP PGUID b f f    21    21    16 524 520 int2le scalarlesel scalarlejoinsel ));
 DESCR("less than or equal");
-DATA(insert OID = 523 (  "<="       PGNSP PGUID b f f    23    23    16 525 521 int4le scalarltsel scalarltjoinsel ));
+DATA(insert OID = 523 (  "<="       PGNSP PGUID b f f    23    23    16 525 521 int4le scalarlesel scalarlejoinsel ));
 DESCR("less than or equal");
-DATA(insert OID = 524 (  ">="       PGNSP PGUID b f f    21    21    16 522    95 int2ge scalargtsel scalargtjoinsel
));
+DATA(insert OID = 524 (  ">="       PGNSP PGUID b f f    21    21    16 522    95 int2ge scalargesel scalargejoinsel
));
 DESCR("greater than or equal");
-DATA(insert OID = 525 (  ">="       PGNSP PGUID b f f    23    23    16 523    97 int4ge scalargtsel scalargtjoinsel
));
+DATA(insert OID = 525 (  ">="       PGNSP PGUID b f f    23    23    16 523    97 int4ge scalargesel scalargejoinsel
));
 DESCR("greater than or equal");
 DATA(insert OID = 526 (  "*"       PGNSP PGUID b f f    21    21    21 526     0 int2mul - - ));
 DESCR("multiply");
@@ -313,13 +313,13 @@ DATA(insert OID = 538 (  "<>"       PGNSP PGUID b f f    21    23    16 539 532 int24ne neqs
 DESCR("not equal");
 DATA(insert OID = 539 (  "<>"       PGNSP PGUID b f f    23    21    16 538 533 int42ne neqsel neqjoinsel ));
 DESCR("not equal");
-DATA(insert OID = 540 (  "<="       PGNSP PGUID b f f    21    23    16 543 536 int24le scalarltsel scalarltjoinsel
));
+DATA(insert OID = 540 (  "<="       PGNSP PGUID b f f    21    23    16 543 536 int24le scalarlesel scalarlejoinsel
));
 DESCR("less than or equal");
-DATA(insert OID = 541 (  "<="       PGNSP PGUID b f f    23    21    16 542 537 int42le scalarltsel scalarltjoinsel
));
+DATA(insert OID = 541 (  "<="       PGNSP PGUID b f f    23    21    16 542 537 int42le scalarlesel scalarlejoinsel
));
 DESCR("less than or equal");
-DATA(insert OID = 542 (  ">="       PGNSP PGUID b f f    21    23    16 541 534 int24ge scalargtsel scalargtjoinsel
));
+DATA(insert OID = 542 (  ">="       PGNSP PGUID b f f    21    23    16 541 534 int24ge scalargesel scalargejoinsel
));
 DESCR("greater than or equal");
-DATA(insert OID = 543 (  ">="       PGNSP PGUID b f f    23    21    16 540 535 int42ge scalargtsel scalargtjoinsel
));
+DATA(insert OID = 543 (  ">="       PGNSP PGUID b f f    23    21    16 540 535 int42ge scalargesel scalargejoinsel
));
 DESCR("greater than or equal");
 DATA(insert OID = 544 (  "*"       PGNSP PGUID b f f    21    23    23 545     0 int24mul - - ));
 DESCR("multiply");
@@ -357,9 +357,9 @@ DATA(insert OID = 562 (  "<"       PGNSP PGUID b f f 702 702    16 563 565 abstimelt s
 DESCR("less than");
 DATA(insert OID = 563 (  ">"       PGNSP PGUID b f f 702 702    16 562 564 abstimegt scalargtsel scalargtjoinsel ));
 DESCR("greater than");
-DATA(insert OID = 564 (  "<="       PGNSP PGUID b f f 702 702    16 565 563 abstimele scalarltsel scalarltjoinsel ));
+DATA(insert OID = 564 (  "<="       PGNSP PGUID b f f 702 702    16 565 563 abstimele scalarlesel scalarlejoinsel ));
 DESCR("less than or equal");
-DATA(insert OID = 565 (  ">="       PGNSP PGUID b f f 702 702    16 564 562 abstimege scalargtsel scalargtjoinsel ));
+DATA(insert OID = 565 (  ">="       PGNSP PGUID b f f 702 702    16 564 562 abstimege scalargesel scalargejoinsel ));
 DESCR("greater than or equal");
 DATA(insert OID = 566 (  "="       PGNSP PGUID b t t 703 703    16 566 567 reltimeeq eqsel eqjoinsel ));
 DESCR("equal");
@@ -369,9 +369,9 @@ DATA(insert OID = 568 (  "<"       PGNSP PGUID b f f 703 703    16 569 571 reltimelt s
 DESCR("less than");
 DATA(insert OID = 569 (  ">"       PGNSP PGUID b f f 703 703    16 568 570 reltimegt scalargtsel scalargtjoinsel ));
 DESCR("greater than");
-DATA(insert OID = 570 (  "<="       PGNSP PGUID b f f 703 703    16 571 569 reltimele scalarltsel scalarltjoinsel ));
+DATA(insert OID = 570 (  "<="       PGNSP PGUID b f f 703 703    16 571 569 reltimele scalarlesel scalarlejoinsel ));
 DESCR("less than or equal");
-DATA(insert OID = 571 (  ">="       PGNSP PGUID b f f 703 703    16 570 568 reltimege scalargtsel scalargtjoinsel ));
+DATA(insert OID = 571 (  ">="       PGNSP PGUID b f f 703 703    16 570 568 reltimege scalargesel scalargejoinsel ));
 DESCR("greater than or equal");
 DATA(insert OID = 572 (  "~="       PGNSP PGUID b f f 704 704    16 572     0 tintervalsame eqsel eqjoinsel ));
 DESCR("same as");
@@ -438,9 +438,9 @@ DATA(insert OID = 609 (  "<"       PGNSP PGUID b f f    26    26    16 610 612 oidlt scalarl
 DESCR("less than");
 DATA(insert OID = 610 (  ">"       PGNSP PGUID b f f    26    26    16 609 611 oidgt scalargtsel scalargtjoinsel ));
 DESCR("greater than");
-DATA(insert OID = 611 (  "<="       PGNSP PGUID b f f    26    26    16 612 610 oidle scalarltsel scalarltjoinsel ));
+DATA(insert OID = 611 (  "<="       PGNSP PGUID b f f    26    26    16 612 610 oidle scalarlesel scalarlejoinsel ));
 DESCR("less than or equal");
-DATA(insert OID = 612 (  ">="       PGNSP PGUID b f f    26    26    16 611 609 oidge scalargtsel scalargtjoinsel ));
+DATA(insert OID = 612 (  ">="       PGNSP PGUID b f f    26    26    16 611 609 oidge scalargesel scalargejoinsel ));
 DESCR("greater than or equal");

 DATA(insert OID = 644 (  "<>"       PGNSP PGUID b f f    30    30    16 644 649 oidvectorne neqsel neqjoinsel ));
@@ -449,9 +449,9 @@ DATA(insert OID = 645 (  "<"       PGNSP PGUID b f f    30    30    16 646 648 oidvectorlt s
 DESCR("less than");
 DATA(insert OID = 646 (  ">"       PGNSP PGUID b f f    30    30    16 645 647 oidvectorgt scalargtsel scalargtjoinsel
));
 DESCR("greater than");
-DATA(insert OID = 647 (  "<="       PGNSP PGUID b f f    30    30    16 648 646 oidvectorle scalarltsel
scalarltjoinsel)); 
+DATA(insert OID = 647 (  "<="       PGNSP PGUID b f f    30    30    16 648 646 oidvectorle scalarlesel
scalarlejoinsel)); 
 DESCR("less than or equal");
-DATA(insert OID = 648 (  ">="       PGNSP PGUID b f f    30    30    16 647 645 oidvectorge scalargtsel
scalargtjoinsel)); 
+DATA(insert OID = 648 (  ">="       PGNSP PGUID b f f    30    30    16 647 645 oidvectorge scalargesel
scalargejoinsel)); 
 DESCR("greater than or equal");
 DATA(insert OID = 649 (  "="       PGNSP PGUID b t t    30    30    16 649 644 oidvectoreq eqsel eqjoinsel ));
 DESCR("equal");
@@ -477,20 +477,20 @@ DATA(insert OID = 622 (  "<"       PGNSP PGUID b f f    700  700    16 623 625 float4lt s
 DESCR("less than");
 DATA(insert OID = 623 (  ">"       PGNSP PGUID b f f    700  700    16 622 624 float4gt scalargtsel scalargtjoinsel
));
 DESCR("greater than");
-DATA(insert OID = 624 (  "<="       PGNSP PGUID b f f    700  700    16 625 623 float4le scalarltsel scalarltjoinsel
));
+DATA(insert OID = 624 (  "<="       PGNSP PGUID b f f    700  700    16 625 623 float4le scalarlesel scalarlejoinsel
));
 DESCR("less than or equal");
-DATA(insert OID = 625 (  ">="       PGNSP PGUID b f f    700  700    16 624 622 float4ge scalargtsel scalargtjoinsel
));
+DATA(insert OID = 625 (  ">="       PGNSP PGUID b f f    700  700    16 624 622 float4ge scalargesel scalargejoinsel
));
 DESCR("greater than or equal");
 DATA(insert OID = 630 (  "<>"       PGNSP PGUID b f f    18    18        16 630    92    charne neqsel neqjoinsel ));
 DESCR("not equal");

 DATA(insert OID = 631 (  "<"       PGNSP PGUID b f f    18    18    16 633 634 charlt scalarltsel scalarltjoinsel ));
 DESCR("less than");
-DATA(insert OID = 632 (  "<="       PGNSP PGUID b f f    18    18    16 634 633 charle scalarltsel scalarltjoinsel ));
+DATA(insert OID = 632 (  "<="       PGNSP PGUID b f f    18    18    16 634 633 charle scalarlesel scalarlejoinsel ));
 DESCR("less than or equal");
 DATA(insert OID = 633 (  ">"       PGNSP PGUID b f f    18    18    16 631 632 chargt scalargtsel scalargtjoinsel ));
 DESCR("greater than");
-DATA(insert OID = 634 (  ">="       PGNSP PGUID b f f    18    18    16 632 631 charge scalargtsel scalargtjoinsel ));
+DATA(insert OID = 634 (  ">="       PGNSP PGUID b f f    18    18    16 632 631 charge scalargesel scalargejoinsel ));
 DESCR("greater than or equal");

 DATA(insert OID = 639 (  "~"       PGNSP PGUID b f f    19    25    16 0 640 nameregexeq regexeqsel regexeqjoinsel ));
@@ -510,19 +510,19 @@ DESCR("concatenate");

 DATA(insert OID = 660 (  "<"       PGNSP PGUID b f f    19    19    16 662 663 namelt scalarltsel scalarltjoinsel ));
 DESCR("less than");
-DATA(insert OID = 661 (  "<="       PGNSP PGUID b f f    19    19    16 663 662 namele scalarltsel scalarltjoinsel ));
+DATA(insert OID = 661 (  "<="       PGNSP PGUID b f f    19    19    16 663 662 namele scalarlesel scalarlejoinsel ));
 DESCR("less than or equal");
 DATA(insert OID = 662 (  ">"       PGNSP PGUID b f f    19    19    16 660 661 namegt scalargtsel scalargtjoinsel ));
 DESCR("greater than");
-DATA(insert OID = 663 (  ">="       PGNSP PGUID b f f    19    19    16 661 660 namege scalargtsel scalargtjoinsel ));
+DATA(insert OID = 663 (  ">="       PGNSP PGUID b f f    19    19    16 661 660 namege scalargesel scalargejoinsel ));
 DESCR("greater than or equal");
 DATA(insert OID = 664 (  "<"       PGNSP PGUID b f f    25    25    16 666 667 text_lt scalarltsel scalarltjoinsel ));
 DESCR("less than");
-DATA(insert OID = 665 (  "<="       PGNSP PGUID b f f    25    25    16 667 666 text_le scalarltsel scalarltjoinsel
));
+DATA(insert OID = 665 (  "<="       PGNSP PGUID b f f    25    25    16 667 666 text_le scalarlesel scalarlejoinsel
));
 DESCR("less than or equal");
 DATA(insert OID = 666 (  ">"       PGNSP PGUID b f f    25    25    16 664 665 text_gt scalargtsel scalargtjoinsel ));
 DESCR("greater than");
-DATA(insert OID = 667 (  ">="       PGNSP PGUID b f f    25    25    16 665 664 text_ge scalargtsel scalargtjoinsel
));
+DATA(insert OID = 667 (  ">="       PGNSP PGUID b f f    25    25    16 665 664 text_ge scalargesel scalargejoinsel
));
 DESCR("greater than or equal");

 DATA(insert OID = 670 (  "="       PGNSP PGUID b t t    701  701    16 670 671 float8eq eqsel eqjoinsel ));
@@ -532,11 +532,11 @@ DESCR("not equal");
 DATA(insert OID = 672 (  "<"       PGNSP PGUID b f f    701  701    16 674 675 float8lt scalarltsel scalarltjoinsel
));
 DESCR("less than");
 #define Float8LessOperator    672
-DATA(insert OID = 673 (  "<="       PGNSP PGUID b f f    701  701    16 675 674 float8le scalarltsel scalarltjoinsel
));
+DATA(insert OID = 673 (  "<="       PGNSP PGUID b f f    701  701    16 675 674 float8le scalarlesel scalarlejoinsel
));
 DESCR("less than or equal");
 DATA(insert OID = 674 (  ">"       PGNSP PGUID b f f    701  701    16 672 673 float8gt scalargtsel scalargtjoinsel
));
 DESCR("greater than");
-DATA(insert OID = 675 (  ">="       PGNSP PGUID b f f    701  701    16 673 672 float8ge scalargtsel scalargtjoinsel
));
+DATA(insert OID = 675 (  ">="       PGNSP PGUID b f f    701  701    16 673 672 float8ge scalargesel scalargejoinsel
));
 DESCR("greater than or equal");

 DATA(insert OID = 682 (  "@"       PGNSP PGUID l f f     0    21    21     0     0 int2abs - - ));
@@ -677,9 +677,9 @@ DATA(insert OID = 813 (  "<"       PGNSP PGUID b f f 704 704    16 814 816 tintervallt
 DESCR("less than");
 DATA(insert OID = 814 (  ">"       PGNSP PGUID b f f 704 704    16 813 815 tintervalgt scalargtsel scalargtjoinsel ));
 DESCR("greater than");
-DATA(insert OID = 815 (  "<="       PGNSP PGUID b f f 704 704    16 816 814 tintervalle scalarltsel scalarltjoinsel
));
+DATA(insert OID = 815 (  "<="       PGNSP PGUID b f f 704 704    16 816 814 tintervalle scalarlesel scalarlejoinsel
));
 DESCR("less than or equal");
-DATA(insert OID = 816 (  ">="       PGNSP PGUID b f f 704 704    16 815 813 tintervalge scalargtsel scalargtjoinsel
));
+DATA(insert OID = 816 (  ">="       PGNSP PGUID b f f 704 704    16 815 813 tintervalge scalargesel scalargejoinsel
));
 DESCR("greater than or equal");

 DATA(insert OID = 843 (  "*"       PGNSP PGUID b f f    790  700    790 845   0 cash_mul_flt4 - - ));
@@ -697,9 +697,9 @@ DATA(insert OID = 902 (  "<"       PGNSP PGUID b f f    790  790    16 903 905 cash_lt sc
 DESCR("less than");
 DATA(insert OID = 903 (  ">"       PGNSP PGUID b f f    790  790    16 902 904 cash_gt scalargtsel scalargtjoinsel ));
 DESCR("greater than");
-DATA(insert OID = 904 (  "<="       PGNSP PGUID b f f    790  790    16 905 903 cash_le scalarltsel scalarltjoinsel
));
+DATA(insert OID = 904 (  "<="       PGNSP PGUID b f f    790  790    16 905 903 cash_le scalarlesel scalarlejoinsel
));
 DESCR("less than or equal");
-DATA(insert OID = 905 (  ">="       PGNSP PGUID b f f    790  790    16 904 902 cash_ge scalargtsel scalargtjoinsel
));
+DATA(insert OID = 905 (  ">="       PGNSP PGUID b f f    790  790    16 904 902 cash_ge scalargesel scalargejoinsel
));
 DESCR("greater than or equal");
 DATA(insert OID = 906 (  "+"       PGNSP PGUID b f f    790  790    790 906   0 cash_pl - - ));
 DESCR("add");
@@ -763,11 +763,11 @@ DATA(insert OID = 1057 ( "<>"       PGNSP PGUID b f f 1042 1042     16 1057 1054 bpcha
 DESCR("not equal");
 DATA(insert OID = 1058 ( "<"       PGNSP PGUID b f f 1042 1042     16 1060 1061 bpcharlt scalarltsel scalarltjoinsel
));
 DESCR("less than");
-DATA(insert OID = 1059 ( "<="       PGNSP PGUID b f f 1042 1042     16 1061 1060 bpcharle scalarltsel scalarltjoinsel
));
+DATA(insert OID = 1059 ( "<="       PGNSP PGUID b f f 1042 1042     16 1061 1060 bpcharle scalarlesel scalarlejoinsel
));
 DESCR("less than or equal");
 DATA(insert OID = 1060 ( ">"       PGNSP PGUID b f f 1042 1042     16 1058 1059 bpchargt scalargtsel scalargtjoinsel
));
 DESCR("greater than");
-DATA(insert OID = 1061 ( ">="       PGNSP PGUID b f f 1042 1042     16 1059 1058 bpcharge scalargtsel scalargtjoinsel
));
+DATA(insert OID = 1061 ( ">="       PGNSP PGUID b f f 1042 1042     16 1059 1058 bpcharge scalargesel scalargejoinsel
));
 DESCR("greater than or equal");

 /* generic array comparison operators */
@@ -782,9 +782,9 @@ DESCR("less than");
 DATA(insert OID = 1073 (  ">"       PGNSP PGUID b f f 2277 2277 16 1072 1074 array_gt scalargtsel scalargtjoinsel ));
 DESCR("greater than");
 #define ARRAY_GT_OP 1073
-DATA(insert OID = 1074 (  "<="       PGNSP PGUID b f f 2277 2277 16 1075 1073 array_le scalarltsel scalarltjoinsel ));
+DATA(insert OID = 1074 (  "<="       PGNSP PGUID b f f 2277 2277 16 1075 1073 array_le scalarlesel scalarlejoinsel ));
 DESCR("less than or equal");
-DATA(insert OID = 1075 (  ">="       PGNSP PGUID b f f 2277 2277 16 1074 1072 array_ge scalargtsel scalargtjoinsel ));
+DATA(insert OID = 1075 (  ">="       PGNSP PGUID b f f 2277 2277 16 1074 1072 array_ge scalargesel scalargejoinsel ));
 DESCR("greater than or equal");

 /* date operators */
@@ -798,11 +798,11 @@ DATA(insert OID = 1094 ( "<>"       PGNSP PGUID b f f    1082    1082   16 1094 1093 date
 DESCR("not equal");
 DATA(insert OID = 1095 ( "<"       PGNSP PGUID b f f    1082    1082   16 1097 1098 date_lt scalarltsel
scalarltjoinsel)); 
 DESCR("less than");
-DATA(insert OID = 1096 ( "<="       PGNSP PGUID b f f    1082    1082   16 1098 1097 date_le scalarltsel
scalarltjoinsel)); 
+DATA(insert OID = 1096 ( "<="       PGNSP PGUID b f f    1082    1082   16 1098 1097 date_le scalarlesel
scalarlejoinsel)); 
 DESCR("less than or equal");
 DATA(insert OID = 1097 ( ">"       PGNSP PGUID b f f    1082    1082   16 1095 1096 date_gt scalargtsel
scalargtjoinsel)); 
 DESCR("greater than");
-DATA(insert OID = 1098 ( ">="       PGNSP PGUID b f f    1082    1082   16 1096 1095 date_ge scalargtsel
scalargtjoinsel)); 
+DATA(insert OID = 1098 ( ">="       PGNSP PGUID b f f    1082    1082   16 1096 1095 date_ge scalargesel
scalargejoinsel)); 
 DESCR("greater than or equal");
 DATA(insert OID = 1099 ( "-"       PGNSP PGUID b f f    1082    1082   23 0 0 date_mi - - ));
 DESCR("subtract");
@@ -818,11 +818,11 @@ DATA(insert OID = 1109 ( "<>"       PGNSP PGUID b f f    1083    1083  16 1109 1108 time_
 DESCR("not equal");
 DATA(insert OID = 1110 ( "<"       PGNSP PGUID b f f    1083    1083  16 1112 1113 time_lt scalarltsel scalarltjoinsel
));
 DESCR("less than");
-DATA(insert OID = 1111 ( "<="       PGNSP PGUID b f f    1083    1083  16 1113 1112 time_le scalarltsel
scalarltjoinsel)); 
+DATA(insert OID = 1111 ( "<="       PGNSP PGUID b f f    1083    1083  16 1113 1112 time_le scalarlesel
scalarlejoinsel)); 
 DESCR("less than or equal");
 DATA(insert OID = 1112 ( ">"       PGNSP PGUID b f f    1083    1083  16 1110 1111 time_gt scalargtsel scalargtjoinsel
));
 DESCR("greater than");
-DATA(insert OID = 1113 ( ">="       PGNSP PGUID b f f    1083    1083  16 1111 1110 time_ge scalargtsel
scalargtjoinsel)); 
+DATA(insert OID = 1113 ( ">="       PGNSP PGUID b f f    1083    1083  16 1111 1110 time_ge scalargesel
scalargejoinsel)); 
 DESCR("greater than or equal");

 /* timetz operators */
@@ -832,11 +832,11 @@ DATA(insert OID = 1551 ( "<>"       PGNSP PGUID b f f    1266 1266    16 1551 1550 timetz
 DESCR("not equal");
 DATA(insert OID = 1552 ( "<"       PGNSP PGUID b f f    1266 1266    16 1554 1555 timetz_lt scalarltsel
scalarltjoinsel)); 
 DESCR("less than");
-DATA(insert OID = 1553 ( "<="       PGNSP PGUID b f f    1266 1266    16 1555 1554 timetz_le scalarltsel
scalarltjoinsel)); 
+DATA(insert OID = 1553 ( "<="       PGNSP PGUID b f f    1266 1266    16 1555 1554 timetz_le scalarlesel
scalarlejoinsel)); 
 DESCR("less than or equal");
 DATA(insert OID = 1554 ( ">"       PGNSP PGUID b f f    1266 1266    16 1552 1553 timetz_gt scalargtsel
scalargtjoinsel)); 
 DESCR("greater than");
-DATA(insert OID = 1555 ( ">="       PGNSP PGUID b f f    1266 1266    16 1553 1552 timetz_ge scalargtsel
scalargtjoinsel)); 
+DATA(insert OID = 1555 ( ">="       PGNSP PGUID b f f    1266 1266    16 1553 1552 timetz_ge scalargesel
scalargejoinsel)); 
 DESCR("greater than or equal");

 /* float48 operators */
@@ -856,9 +856,9 @@ DATA(insert OID = 1122 (  "<"        PGNSP PGUID b f f  700    701  16 1133 1125 float48l
 DESCR("less than");
 DATA(insert OID = 1123 (  ">"        PGNSP PGUID b f f  700    701  16 1132 1124 float48gt scalargtsel scalargtjoinsel
));
 DESCR("greater than");
-DATA(insert OID = 1124 (  "<="        PGNSP PGUID b f f  700    701  16 1135 1123 float48le scalarltsel
scalarltjoinsel)); 
+DATA(insert OID = 1124 (  "<="        PGNSP PGUID b f f  700    701  16 1135 1123 float48le scalarlesel
scalarlejoinsel)); 
 DESCR("less than or equal");
-DATA(insert OID = 1125 (  ">="        PGNSP PGUID b f f  700    701  16 1134 1122 float48ge scalargtsel
scalargtjoinsel)); 
+DATA(insert OID = 1125 (  ">="        PGNSP PGUID b f f  700    701  16 1134 1122 float48ge scalargesel
scalargejoinsel)); 
 DESCR("greater than or equal");

 /* float84 operators */
@@ -878,9 +878,9 @@ DATA(insert OID = 1132 (  "<"        PGNSP PGUID b f f  701    700  16 1123 1135 float84l
 DESCR("less than");
 DATA(insert OID = 1133 (  ">"        PGNSP PGUID b f f  701    700  16 1122 1134 float84gt scalargtsel scalargtjoinsel
));
 DESCR("greater than");
-DATA(insert OID = 1134 (  "<="        PGNSP PGUID b f f  701    700  16 1125 1133 float84le scalarltsel
scalarltjoinsel)); 
+DATA(insert OID = 1134 (  "<="        PGNSP PGUID b f f  701    700  16 1125 1133 float84le scalarlesel
scalarlejoinsel)); 
 DESCR("less than or equal");
-DATA(insert OID = 1135 (  ">="        PGNSP PGUID b f f  701    700  16 1124 1132 float84ge scalargtsel
scalargtjoinsel)); 
+DATA(insert OID = 1135 (  ">="        PGNSP PGUID b f f  701    700  16 1124 1132 float84ge scalargesel
scalargejoinsel)); 
 DESCR("greater than or equal");


@@ -925,11 +925,11 @@ DATA(insert OID = 1321 (  "<>"       PGNSP PGUID b f f 1184 1184     16 1321 1320 time
 DESCR("not equal");
 DATA(insert OID = 1322 (  "<"       PGNSP PGUID b f f 1184 1184     16 1324 1325 timestamptz_lt scalarltsel
scalarltjoinsel)); 
 DESCR("less than");
-DATA(insert OID = 1323 (  "<="       PGNSP PGUID b f f 1184 1184     16 1325 1324 timestamptz_le scalarltsel
scalarltjoinsel)); 
+DATA(insert OID = 1323 (  "<="       PGNSP PGUID b f f 1184 1184     16 1325 1324 timestamptz_le scalarlesel
scalarlejoinsel)); 
 DESCR("less than or equal");
 DATA(insert OID = 1324 (  ">"       PGNSP PGUID b f f 1184 1184     16 1322 1323 timestamptz_gt scalargtsel
scalargtjoinsel)); 
 DESCR("greater than");
-DATA(insert OID = 1325 (  ">="       PGNSP PGUID b f f 1184 1184     16 1323 1322 timestamptz_ge scalargtsel
scalargtjoinsel)); 
+DATA(insert OID = 1325 (  ">="       PGNSP PGUID b f f 1184 1184     16 1323 1322 timestamptz_ge scalargesel
scalargejoinsel)); 
 DESCR("greater than or equal");
 DATA(insert OID = 1327 (  "+"       PGNSP PGUID b f f 1184 1186 1184  2554 0 timestamptz_pl_interval - - ));
 DESCR("add");
@@ -945,11 +945,11 @@ DATA(insert OID = 1331 (  "<>"       PGNSP PGUID b f f 1186 1186     16 1331 1330 inte
 DESCR("not equal");
 DATA(insert OID = 1332 (  "<"       PGNSP PGUID b f f 1186 1186     16 1334 1335 interval_lt scalarltsel
scalarltjoinsel)); 
 DESCR("less than");
-DATA(insert OID = 1333 (  "<="       PGNSP PGUID b f f 1186 1186     16 1335 1334 interval_le scalarltsel
scalarltjoinsel)); 
+DATA(insert OID = 1333 (  "<="       PGNSP PGUID b f f 1186 1186     16 1335 1334 interval_le scalarlesel
scalarlejoinsel)); 
 DESCR("less than or equal");
 DATA(insert OID = 1334 (  ">"       PGNSP PGUID b f f 1186 1186     16 1332 1333 interval_gt scalargtsel
scalargtjoinsel)); 
 DESCR("greater than");
-DATA(insert OID = 1335 (  ">="       PGNSP PGUID b f f 1186 1186     16 1333 1332 interval_ge scalargtsel
scalargtjoinsel)); 
+DATA(insert OID = 1335 (  ">="       PGNSP PGUID b f f 1186 1186     16 1333 1332 interval_ge scalargesel
scalargejoinsel)); 
 DESCR("greater than or equal");

 DATA(insert OID = 1336 (  "-"       PGNSP PGUID l f f    0 1186 1186    0    0 interval_um - - ));
@@ -1126,11 +1126,11 @@ DATA(insert OID = 1221 (  "<>"       PGNSP PGUID b f f 829 829     16 1221 1220 macadd
 DESCR("not equal");
 DATA(insert OID = 1222 (  "<"       PGNSP PGUID b f f 829 829     16 1224 1225 macaddr_lt scalarltsel scalarltjoinsel
));
 DESCR("less than");
-DATA(insert OID = 1223 (  "<="       PGNSP PGUID b f f 829 829     16 1225 1224 macaddr_le scalarltsel scalarltjoinsel
));
+DATA(insert OID = 1223 (  "<="       PGNSP PGUID b f f 829 829     16 1225 1224 macaddr_le scalarlesel scalarlejoinsel
));
 DESCR("less than or equal");
 DATA(insert OID = 1224 (  ">"       PGNSP PGUID b f f 829 829     16 1222 1223 macaddr_gt scalargtsel scalargtjoinsel
));
 DESCR("greater than");
-DATA(insert OID = 1225 (  ">="       PGNSP PGUID b f f 829 829     16 1223 1222 macaddr_ge scalargtsel scalargtjoinsel
));
+DATA(insert OID = 1225 (  ">="       PGNSP PGUID b f f 829 829     16 1223 1222 macaddr_ge scalargesel scalargejoinsel
));
 DESCR("greater than or equal");

 DATA(insert OID = 3147 (  "~"       PGNSP PGUID l f f      0 829 829 0 0 macaddr_not - - ));
@@ -1147,11 +1147,11 @@ DATA(insert OID = 3363 (  "<>"       PGNSP PGUID b f f 774 774     16 3363 3362 macadd
 DESCR("not equal");
 DATA(insert OID = 3364 (  "<"       PGNSP PGUID b f f 774 774     16 3366 3367 macaddr8_lt scalarltsel scalarltjoinsel
));
 DESCR("less than");
-DATA(insert OID = 3365 (  "<="       PGNSP PGUID b f f 774 774     16 3367 3366 macaddr8_le scalarltsel
scalarltjoinsel)); 
+DATA(insert OID = 3365 (  "<="       PGNSP PGUID b f f 774 774     16 3367 3366 macaddr8_le scalarlesel
scalarlejoinsel)); 
 DESCR("less than or equal");
 DATA(insert OID = 3366 (  ">"       PGNSP PGUID b f f 774 774     16 3364 3365 macaddr8_gt scalargtsel scalargtjoinsel
));
 DESCR("greater than");
-DATA(insert OID = 3367 (  ">="       PGNSP PGUID b f f 774 774     16 3365 3364 macaddr8_ge scalargtsel
scalargtjoinsel)); 
+DATA(insert OID = 3367 (  ">="       PGNSP PGUID b f f 774 774     16 3365 3364 macaddr8_ge scalargesel
scalargejoinsel)); 
 DESCR("greater than or equal");

 DATA(insert OID = 3368 (  "~"       PGNSP PGUID l f f      0 774 774 0 0 macaddr8_not - - ));
@@ -1168,11 +1168,11 @@ DATA(insert OID = 1202 (  "<>"       PGNSP PGUID b f f 869 869     16 1202 1201 networ
 DESCR("not equal");
 DATA(insert OID = 1203 (  "<"       PGNSP PGUID b f f 869 869     16 1205 1206 network_lt scalarltsel scalarltjoinsel
));
 DESCR("less than");
-DATA(insert OID = 1204 (  "<="       PGNSP PGUID b f f 869 869     16 1206 1205 network_le scalarltsel scalarltjoinsel
));
+DATA(insert OID = 1204 (  "<="       PGNSP PGUID b f f 869 869     16 1206 1205 network_le scalarlesel scalarlejoinsel
));
 DESCR("less than or equal");
 DATA(insert OID = 1205 (  ">"       PGNSP PGUID b f f 869 869     16 1203 1204 network_gt scalargtsel scalargtjoinsel
));
 DESCR("greater than");
-DATA(insert OID = 1206 (  ">="       PGNSP PGUID b f f 869 869     16 1204 1203 network_ge scalargtsel scalargtjoinsel
));
+DATA(insert OID = 1206 (  ">="       PGNSP PGUID b f f 869 869     16 1204 1203 network_ge scalargesel scalargejoinsel
));
 DESCR("greater than or equal");
 DATA(insert OID = 931  (  "<<"       PGNSP PGUID b f f 869 869     16 933        0 network_sub networksel
networkjoinsel)); 
 DESCR("is subnet");
@@ -1231,11 +1231,11 @@ DATA(insert OID = 1753 (  "<>"       PGNSP PGUID b f f 1700 1700     16 1753 1752 nume
 DESCR("not equal");
 DATA(insert OID = 1754 (  "<"       PGNSP PGUID b f f 1700 1700     16 1756 1757 numeric_lt scalarltsel
scalarltjoinsel)); 
 DESCR("less than");
-DATA(insert OID = 1755 (  "<="       PGNSP PGUID b f f 1700 1700     16 1757 1756 numeric_le scalarltsel
scalarltjoinsel)); 
+DATA(insert OID = 1755 (  "<="       PGNSP PGUID b f f 1700 1700     16 1757 1756 numeric_le scalarlesel
scalarlejoinsel)); 
 DESCR("less than or equal");
 DATA(insert OID = 1756 (  ">"       PGNSP PGUID b f f 1700 1700     16 1754 1755 numeric_gt scalargtsel
scalargtjoinsel)); 
 DESCR("greater than");
-DATA(insert OID = 1757 (  ">="       PGNSP PGUID b f f 1700 1700     16 1755 1754 numeric_ge scalargtsel
scalargtjoinsel)); 
+DATA(insert OID = 1757 (  ">="       PGNSP PGUID b f f 1700 1700     16 1755 1754 numeric_ge scalargesel
scalargejoinsel)); 
 DESCR("greater than or equal");
 DATA(insert OID = 1758 (  "+"       PGNSP PGUID b f f 1700 1700 1700 1758    0 numeric_add - - ));
 DESCR("add");
@@ -1260,9 +1260,9 @@ DATA(insert OID = 1786 (  "<"      PGNSP PGUID b f f 1560 1560 16 1787 1789 bitlt s
 DESCR("less than");
 DATA(insert OID = 1787 (  ">"      PGNSP PGUID b f f 1560 1560 16 1786 1788 bitgt scalargtsel scalargtjoinsel ));
 DESCR("greater than");
-DATA(insert OID = 1788 (  "<="      PGNSP PGUID b f f 1560 1560 16 1789 1787 bitle scalarltsel scalarltjoinsel ));
+DATA(insert OID = 1788 (  "<="      PGNSP PGUID b f f 1560 1560 16 1789 1787 bitle scalarlesel scalarlejoinsel ));
 DESCR("less than or equal");
-DATA(insert OID = 1789 (  ">="      PGNSP PGUID b f f 1560 1560 16 1788 1786 bitge scalargtsel scalargtjoinsel ));
+DATA(insert OID = 1789 (  ">="      PGNSP PGUID b f f 1560 1560 16 1788 1786 bitge scalargesel scalargejoinsel ));
 DESCR("greater than or equal");
 DATA(insert OID = 1791 (  "&"      PGNSP PGUID b f f 1560 1560 1560 1791  0 bitand - - ));
 DESCR("bitwise and");
@@ -1296,9 +1296,9 @@ DATA(insert OID = 1806 (  "<"      PGNSP PGUID b f f 1562 1562 16 1807 1809 varbitl
 DESCR("less than");
 DATA(insert OID = 1807 (  ">"      PGNSP PGUID b f f 1562 1562 16 1806 1808 varbitgt scalargtsel scalargtjoinsel ));
 DESCR("greater than");
-DATA(insert OID = 1808 (  "<="      PGNSP PGUID b f f 1562 1562 16 1809 1807 varbitle scalarltsel scalarltjoinsel ));
+DATA(insert OID = 1808 (  "<="      PGNSP PGUID b f f 1562 1562 16 1809 1807 varbitle scalarlesel scalarlejoinsel ));
 DESCR("less than or equal");
-DATA(insert OID = 1809 (  ">="      PGNSP PGUID b f f 1562 1562 16 1808 1806 varbitge scalargtsel scalargtjoinsel ));
+DATA(insert OID = 1809 (  ">="      PGNSP PGUID b f f 1562 1562 16 1808 1806 varbitge scalargesel scalargejoinsel ));
 DESCR("greater than or equal");

 DATA(insert OID = 1849 (  "+"       PGNSP PGUID b f f 1186 1083 1083  1800 0 interval_pl_time - - ));
@@ -1312,9 +1312,9 @@ DATA(insert OID = 1864 ( "<"       PGNSP PGUID b f f    21    20    16 1871  1867 int28lt sc
 DESCR("less than");
 DATA(insert OID = 1865 ( ">"       PGNSP PGUID b f f    21    20    16 1870  1866 int28gt scalargtsel scalargtjoinsel
));
 DESCR("greater than");
-DATA(insert OID = 1866 ( "<="       PGNSP PGUID b f f    21    20    16 1873  1865 int28le scalarltsel scalarltjoinsel
));
+DATA(insert OID = 1866 ( "<="       PGNSP PGUID b f f    21    20    16 1873  1865 int28le scalarlesel scalarlejoinsel
));
 DESCR("less than or equal");
-DATA(insert OID = 1867 ( ">="       PGNSP PGUID b f f    21    20    16 1872  1864 int28ge scalargtsel scalargtjoinsel
));
+DATA(insert OID = 1867 ( ">="       PGNSP PGUID b f f    21    20    16 1872  1864 int28ge scalargesel scalargejoinsel
));
 DESCR("greater than or equal");

 DATA(insert OID = 1868 ( "="       PGNSP PGUID b t t    20    21    16    1862 1869 int82eq eqsel eqjoinsel ));
@@ -1325,9 +1325,9 @@ DATA(insert OID = 1870 ( "<"       PGNSP PGUID b f f    20    21    16    1865 1873 int82lt sca
 DESCR("less than");
 DATA(insert OID = 1871 ( ">"       PGNSP PGUID b f f    20    21    16    1864 1872 int82gt scalargtsel
scalargtjoinsel)); 
 DESCR("greater than");
-DATA(insert OID = 1872 ( "<="       PGNSP PGUID b f f    20    21    16    1867 1871 int82le scalarltsel
scalarltjoinsel)); 
+DATA(insert OID = 1872 ( "<="       PGNSP PGUID b f f    20    21    16    1867 1871 int82le scalarlesel
scalarlejoinsel)); 
 DESCR("less than or equal");
-DATA(insert OID = 1873 ( ">="       PGNSP PGUID b f f    20    21    16    1866 1870 int82ge scalargtsel
scalargtjoinsel)); 
+DATA(insert OID = 1873 ( ">="       PGNSP PGUID b f f    20    21    16    1866 1870 int82ge scalargesel
scalargejoinsel)); 
 DESCR("greater than or equal");

 DATA(insert OID = 1874 ( "&"       PGNSP PGUID b f f    21    21    21    1874  0 int2and - - ));
@@ -1389,11 +1389,11 @@ DATA(insert OID = 1956 ( "<>"       PGNSP PGUID b f f 17 17    16 1956 1955 byteane ne
 DESCR("not equal");
 DATA(insert OID = 1957 ( "<"       PGNSP PGUID b f f 17 17    16 1959 1960 bytealt scalarltsel scalarltjoinsel ));
 DESCR("less than");
-DATA(insert OID = 1958 ( "<="       PGNSP PGUID b f f 17 17    16 1960 1959 byteale scalarltsel scalarltjoinsel ));
+DATA(insert OID = 1958 ( "<="       PGNSP PGUID b f f 17 17    16 1960 1959 byteale scalarlesel scalarlejoinsel ));
 DESCR("less than or equal");
 DATA(insert OID = 1959 ( ">"       PGNSP PGUID b f f 17 17    16 1957 1958 byteagt scalargtsel scalargtjoinsel ));
 DESCR("greater than");
-DATA(insert OID = 1960 ( ">="       PGNSP PGUID b f f 17 17    16 1958 1957 byteage scalargtsel scalargtjoinsel ));
+DATA(insert OID = 1960 ( ">="       PGNSP PGUID b f f 17 17    16 1958 1957 byteage scalargesel scalargejoinsel ));
 DESCR("greater than or equal");

 DATA(insert OID = 2016 (  "~~"       PGNSP PGUID b f f 17 17    16 0    2017 bytealike likesel likejoinsel ));
@@ -1411,11 +1411,11 @@ DATA(insert OID = 2061 (  "<>"       PGNSP PGUID b f f 1114 1114     16 2061 2060 time
 DESCR("not equal");
 DATA(insert OID = 2062 (  "<"       PGNSP PGUID b f f 1114 1114     16 2064 2065 timestamp_lt scalarltsel
scalarltjoinsel)); 
 DESCR("less than");
-DATA(insert OID = 2063 (  "<="       PGNSP PGUID b f f 1114 1114     16 2065 2064 timestamp_le scalarltsel
scalarltjoinsel)); 
+DATA(insert OID = 2063 (  "<="       PGNSP PGUID b f f 1114 1114     16 2065 2064 timestamp_le scalarlesel
scalarlejoinsel)); 
 DESCR("less than or equal");
 DATA(insert OID = 2064 (  ">"       PGNSP PGUID b f f 1114 1114     16 2062 2063 timestamp_gt scalargtsel
scalargtjoinsel)); 
 DESCR("greater than");
-DATA(insert OID = 2065 (  ">="       PGNSP PGUID b f f 1114 1114     16 2063 2062 timestamp_ge scalargtsel
scalargtjoinsel)); 
+DATA(insert OID = 2065 (  ">="       PGNSP PGUID b f f 1114 1114     16 2063 2062 timestamp_ge scalargesel
scalargejoinsel)); 
 DESCR("greater than or equal");
 DATA(insert OID = 2066 (  "+"       PGNSP PGUID b f f 1114 1186 1114  2553 0 timestamp_pl_interval - - ));
 DESCR("add");
@@ -1428,18 +1428,18 @@ DESCR("subtract");

 DATA(insert OID = 2314 ( "~<~"    PGNSP PGUID b f f 25 25 16 2318 2317 text_pattern_lt scalarltsel scalarltjoinsel ));
 DESCR("less than");
-DATA(insert OID = 2315 ( "~<=~" PGNSP PGUID b f f 25 25 16 2317 2318 text_pattern_le scalarltsel scalarltjoinsel ));
+DATA(insert OID = 2315 ( "~<=~" PGNSP PGUID b f f 25 25 16 2317 2318 text_pattern_le scalarlesel scalarlejoinsel ));
 DESCR("less than or equal");
-DATA(insert OID = 2317 ( "~>=~" PGNSP PGUID b f f 25 25 16 2315 2314 text_pattern_ge scalargtsel scalargtjoinsel ));
+DATA(insert OID = 2317 ( "~>=~" PGNSP PGUID b f f 25 25 16 2315 2314 text_pattern_ge scalargesel scalargejoinsel ));
 DESCR("greater than or equal");
 DATA(insert OID = 2318 ( "~>~"    PGNSP PGUID b f f 25 25 16 2314 2315 text_pattern_gt scalargtsel scalargtjoinsel ));
 DESCR("greater than");

 DATA(insert OID = 2326 ( "~<~"    PGNSP PGUID b f f 1042 1042 16 2330 2329 bpchar_pattern_lt scalarltsel
scalarltjoinsel)); 
 DESCR("less than");
-DATA(insert OID = 2327 ( "~<=~" PGNSP PGUID b f f 1042 1042 16 2329 2330 bpchar_pattern_le scalarltsel scalarltjoinsel
));
+DATA(insert OID = 2327 ( "~<=~" PGNSP PGUID b f f 1042 1042 16 2329 2330 bpchar_pattern_le scalarlesel scalarlejoinsel
));
 DESCR("less than or equal");
-DATA(insert OID = 2329 ( "~>=~" PGNSP PGUID b f f 1042 1042 16 2327 2326 bpchar_pattern_ge scalargtsel scalargtjoinsel
));
+DATA(insert OID = 2329 ( "~>=~" PGNSP PGUID b f f 1042 1042 16 2327 2326 bpchar_pattern_ge scalargesel scalargejoinsel
));
 DESCR("greater than or equal");
 DATA(insert OID = 2330 ( "~>~"    PGNSP PGUID b f f 1042 1042 16 2326 2327 bpchar_pattern_gt scalargtsel
scalargtjoinsel)); 
 DESCR("greater than");
@@ -1448,11 +1448,11 @@ DESCR("greater than");

 DATA(insert OID = 2345 ( "<"       PGNSP PGUID b f f    1082    1114   16 2375 2348 date_lt_timestamp scalarltsel
scalarltjoinsel)); 
 DESCR("less than");
-DATA(insert OID = 2346 ( "<="       PGNSP PGUID b f f    1082    1114   16 2374 2349 date_le_timestamp scalarltsel
scalarltjoinsel)); 
+DATA(insert OID = 2346 ( "<="       PGNSP PGUID b f f    1082    1114   16 2374 2349 date_le_timestamp scalarlesel
scalarlejoinsel)); 
 DESCR("less than or equal");
 DATA(insert OID = 2347 ( "="       PGNSP PGUID b t f    1082    1114   16 2373 2350 date_eq_timestamp eqsel eqjoinsel
));
 DESCR("equal");
-DATA(insert OID = 2348 ( ">="       PGNSP PGUID b f f    1082    1114   16 2372 2345 date_ge_timestamp scalargtsel
scalargtjoinsel)); 
+DATA(insert OID = 2348 ( ">="       PGNSP PGUID b f f    1082    1114   16 2372 2345 date_ge_timestamp scalargesel
scalargejoinsel)); 
 DESCR("greater than or equal");
 DATA(insert OID = 2349 ( ">"       PGNSP PGUID b f f    1082    1114   16 2371 2346 date_gt_timestamp scalargtsel
scalargtjoinsel)); 
 DESCR("greater than");
@@ -1461,11 +1461,11 @@ DESCR("not equal");

 DATA(insert OID = 2358 ( "<"       PGNSP PGUID b f f    1082    1184   16 2388 2361 date_lt_timestamptz scalarltsel
scalarltjoinsel)); 
 DESCR("less than");
-DATA(insert OID = 2359 ( "<="       PGNSP PGUID b f f    1082    1184   16 2387 2362 date_le_timestamptz scalarltsel
scalarltjoinsel)); 
+DATA(insert OID = 2359 ( "<="       PGNSP PGUID b f f    1082    1184   16 2387 2362 date_le_timestamptz scalarlesel
scalarlejoinsel)); 
 DESCR("less than or equal");
 DATA(insert OID = 2360 ( "="       PGNSP PGUID b t f    1082    1184   16 2386 2363 date_eq_timestamptz eqsel
eqjoinsel)); 
 DESCR("equal");
-DATA(insert OID = 2361 ( ">="       PGNSP PGUID b f f    1082    1184   16 2385 2358 date_ge_timestamptz scalargtsel
scalargtjoinsel)); 
+DATA(insert OID = 2361 ( ">="       PGNSP PGUID b f f    1082    1184   16 2385 2358 date_ge_timestamptz scalargesel
scalargejoinsel)); 
 DESCR("greater than or equal");
 DATA(insert OID = 2362 ( ">"       PGNSP PGUID b f f    1082    1184   16 2384 2359 date_gt_timestamptz scalargtsel
scalargtjoinsel)); 
 DESCR("greater than");
@@ -1474,11 +1474,11 @@ DESCR("not equal");

 DATA(insert OID = 2371 ( "<"       PGNSP PGUID b f f    1114    1082   16 2349 2374 timestamp_lt_date scalarltsel
scalarltjoinsel)); 
 DESCR("less than");
-DATA(insert OID = 2372 ( "<="       PGNSP PGUID b f f    1114    1082   16 2348 2375 timestamp_le_date scalarltsel
scalarltjoinsel)); 
+DATA(insert OID = 2372 ( "<="       PGNSP PGUID b f f    1114    1082   16 2348 2375 timestamp_le_date scalarlesel
scalarlejoinsel)); 
 DESCR("less than or equal");
 DATA(insert OID = 2373 ( "="       PGNSP PGUID b t f    1114    1082   16 2347 2376 timestamp_eq_date eqsel eqjoinsel
));
 DESCR("equal");
-DATA(insert OID = 2374 ( ">="       PGNSP PGUID b f f    1114    1082   16 2346 2371 timestamp_ge_date scalargtsel
scalargtjoinsel)); 
+DATA(insert OID = 2374 ( ">="       PGNSP PGUID b f f    1114    1082   16 2346 2371 timestamp_ge_date scalargesel
scalargejoinsel)); 
 DESCR("greater than or equal");
 DATA(insert OID = 2375 ( ">"       PGNSP PGUID b f f    1114    1082   16 2345 2372 timestamp_gt_date scalargtsel
scalargtjoinsel)); 
 DESCR("greater than");
@@ -1487,11 +1487,11 @@ DESCR("not equal");

 DATA(insert OID = 2384 ( "<"       PGNSP PGUID b f f    1184    1082   16 2362 2387 timestamptz_lt_date scalarltsel
scalarltjoinsel)); 
 DESCR("less than");
-DATA(insert OID = 2385 ( "<="       PGNSP PGUID b f f    1184    1082   16 2361 2388 timestamptz_le_date scalarltsel
scalarltjoinsel)); 
+DATA(insert OID = 2385 ( "<="       PGNSP PGUID b f f    1184    1082   16 2361 2388 timestamptz_le_date scalarlesel
scalarlejoinsel)); 
 DESCR("less than or equal");
 DATA(insert OID = 2386 ( "="       PGNSP PGUID b t f    1184    1082   16 2360 2389 timestamptz_eq_date eqsel
eqjoinsel)); 
 DESCR("equal");
-DATA(insert OID = 2387 ( ">="       PGNSP PGUID b f f    1184    1082   16 2359 2384 timestamptz_ge_date scalargtsel
scalargtjoinsel)); 
+DATA(insert OID = 2387 ( ">="       PGNSP PGUID b f f    1184    1082   16 2359 2384 timestamptz_ge_date scalargesel
scalargejoinsel)); 
 DESCR("greater than or equal");
 DATA(insert OID = 2388 ( ">"       PGNSP PGUID b f f    1184    1082   16 2358 2385 timestamptz_gt_date scalargtsel
scalargtjoinsel)); 
 DESCR("greater than");
@@ -1502,11 +1502,11 @@ DESCR("not equal");

 DATA(insert OID = 2534 ( "<"       PGNSP PGUID b f f    1114    1184   16 2544 2537 timestamp_lt_timestamptz
scalarltselscalarltjoinsel )); 
 DESCR("less than");
-DATA(insert OID = 2535 ( "<="       PGNSP PGUID b f f    1114    1184   16 2543 2538 timestamp_le_timestamptz
scalarltselscalarltjoinsel )); 
+DATA(insert OID = 2535 ( "<="       PGNSP PGUID b f f    1114    1184   16 2543 2538 timestamp_le_timestamptz
scalarleselscalarlejoinsel )); 
 DESCR("less than or equal");
 DATA(insert OID = 2536 ( "="       PGNSP PGUID b t f    1114    1184   16 2542 2539 timestamp_eq_timestamptz eqsel
eqjoinsel)); 
 DESCR("equal");
-DATA(insert OID = 2537 ( ">="       PGNSP PGUID b f f    1114    1184   16 2541 2534 timestamp_ge_timestamptz
scalargtselscalargtjoinsel )); 
+DATA(insert OID = 2537 ( ">="       PGNSP PGUID b f f    1114    1184   16 2541 2534 timestamp_ge_timestamptz
scalargeselscalargejoinsel )); 
 DESCR("greater than or equal");
 DATA(insert OID = 2538 ( ">"       PGNSP PGUID b f f    1114    1184   16 2540 2535 timestamp_gt_timestamptz
scalargtselscalargtjoinsel )); 
 DESCR("greater than");
@@ -1515,11 +1515,11 @@ DESCR("not equal");

 DATA(insert OID = 2540 ( "<"       PGNSP PGUID b f f    1184    1114   16 2538 2543 timestamptz_lt_timestamp
scalarltselscalarltjoinsel )); 
 DESCR("less than");
-DATA(insert OID = 2541 ( "<="       PGNSP PGUID b f f    1184    1114   16 2537 2544 timestamptz_le_timestamp
scalarltselscalarltjoinsel )); 
+DATA(insert OID = 2541 ( "<="       PGNSP PGUID b f f    1184    1114   16 2537 2544 timestamptz_le_timestamp
scalarleselscalarlejoinsel )); 
 DESCR("less than or equal");
 DATA(insert OID = 2542 ( "="       PGNSP PGUID b t f    1184    1114   16 2536 2545 timestamptz_eq_timestamp eqsel
eqjoinsel)); 
 DESCR("equal");
-DATA(insert OID = 2543 ( ">="       PGNSP PGUID b f f    1184    1114   16 2535 2540 timestamptz_ge_timestamp
scalargtselscalargtjoinsel )); 
+DATA(insert OID = 2543 ( ">="       PGNSP PGUID b f f    1184    1114   16 2535 2540 timestamptz_ge_timestamp
scalargeselscalargejoinsel )); 
 DESCR("greater than or equal");
 DATA(insert OID = 2544 ( ">"       PGNSP PGUID b f f    1184    1114   16 2534 2541 timestamptz_gt_timestamp
scalargtselscalargtjoinsel )); 
 DESCR("greater than");
@@ -1624,9 +1624,9 @@ DATA(insert OID = 2974 (  "<"       PGNSP PGUID b f f 2950 2950 16 2975 2977 uuid_l
 DESCR("less than");
 DATA(insert OID = 2975 (  ">"       PGNSP PGUID b f f 2950 2950 16 2974 2976 uuid_gt scalargtsel scalargtjoinsel ));
 DESCR("greater than");
-DATA(insert OID = 2976 (  "<="       PGNSP PGUID b f f 2950 2950 16 2977 2975 uuid_le scalarltsel scalarltjoinsel ));
+DATA(insert OID = 2976 (  "<="       PGNSP PGUID b f f 2950 2950 16 2977 2975 uuid_le scalarlesel scalarlejoinsel ));
 DESCR("less than or equal");
-DATA(insert OID = 2977 (  ">="       PGNSP PGUID b f f 2950 2950 16 2976 2974 uuid_ge scalargtsel scalargtjoinsel ));
+DATA(insert OID = 2977 (  ">="       PGNSP PGUID b f f 2950 2950 16 2976 2974 uuid_ge scalargesel scalargejoinsel ));
 DESCR("greater than or equal");

 /* pg_lsn operators */
@@ -1638,9 +1638,9 @@ DATA(insert OID = 3224 (  "<"       PGNSP PGUID b f f 3220 3220 16 3225 3227 pg_lsn
 DESCR("less than");
 DATA(insert OID = 3225 (  ">"       PGNSP PGUID b f f 3220 3220 16 3224 3226 pg_lsn_gt scalargtsel scalargtjoinsel ));
 DESCR("greater than");
-DATA(insert OID = 3226 (  "<="       PGNSP PGUID b f f 3220 3220 16 3227 3225 pg_lsn_le scalarltsel scalarltjoinsel
));
+DATA(insert OID = 3226 (  "<="       PGNSP PGUID b f f 3220 3220 16 3227 3225 pg_lsn_le scalarlesel scalarlejoinsel
));
 DESCR("less than or equal");
-DATA(insert OID = 3227 (  ">="       PGNSP PGUID b f f 3220 3220 16 3226 3224 pg_lsn_ge scalargtsel scalargtjoinsel
));
+DATA(insert OID = 3227 (  ">="       PGNSP PGUID b f f 3220 3220 16 3226 3224 pg_lsn_ge scalargesel scalargejoinsel
));
 DESCR("greater than or equal");
 DATA(insert OID = 3228 (  "-"       PGNSP PGUID b f f 3220 3220 1700    0    0 pg_lsn_mi - - ));
 DESCR("minus");
@@ -1654,9 +1654,9 @@ DATA(insert OID = 3518 (  "<"       PGNSP PGUID b f f 3500 3500 16 3519 3521 enum_l
 DESCR("less than");
 DATA(insert OID = 3519 (  ">"       PGNSP PGUID b f f 3500 3500 16 3518 3520 enum_gt scalargtsel scalargtjoinsel ));
 DESCR("greater than");
-DATA(insert OID = 3520 (  "<="       PGNSP PGUID b f f 3500 3500 16 3521 3519 enum_le scalarltsel scalarltjoinsel ));
+DATA(insert OID = 3520 (  "<="       PGNSP PGUID b f f 3500 3500 16 3521 3519 enum_le scalarlesel scalarlejoinsel ));
 DESCR("less than or equal");
-DATA(insert OID = 3521 (  ">="       PGNSP PGUID b f f 3500 3500 16 3520 3518 enum_ge scalargtsel scalargtjoinsel ));
+DATA(insert OID = 3521 (  ">="       PGNSP PGUID b f f 3500 3500 16 3520 3518 enum_ge scalargesel scalargejoinsel ));
 DESCR("greater than or equal");

 /*
@@ -1664,13 +1664,13 @@ DESCR("greater than or equal");
  */
 DATA(insert OID = 3627 (  "<"       PGNSP PGUID b f f 3614     3614     16 3632 3631     tsvector_lt scalarltsel
scalarltjoinsel)); 
 DESCR("less than");
-DATA(insert OID = 3628 (  "<="       PGNSP PGUID b f f 3614     3614     16 3631 3632     tsvector_le scalarltsel
scalarltjoinsel)); 
+DATA(insert OID = 3628 (  "<="       PGNSP PGUID b f f 3614     3614     16 3631 3632     tsvector_le scalarlesel
scalarlejoinsel)); 
 DESCR("less than or equal");
 DATA(insert OID = 3629 (  "="       PGNSP PGUID b t f 3614     3614     16 3629 3630     tsvector_eq eqsel eqjoinsel
));
 DESCR("equal");
 DATA(insert OID = 3630 (  "<>"       PGNSP PGUID b f f 3614     3614     16 3630 3629     tsvector_ne neqsel
neqjoinsel)); 
 DESCR("not equal");
-DATA(insert OID = 3631 (  ">="       PGNSP PGUID b f f 3614     3614     16 3628 3627     tsvector_ge scalargtsel
scalargtjoinsel)); 
+DATA(insert OID = 3631 (  ">="       PGNSP PGUID b f f 3614     3614     16 3628 3627     tsvector_ge scalargesel
scalargejoinsel)); 
 DESCR("greater than or equal");
 DATA(insert OID = 3632 (  ">"       PGNSP PGUID b f f 3614     3614     16 3627 3628     tsvector_gt scalargtsel
scalargtjoinsel)); 
 DESCR("greater than");
@@ -1686,13 +1686,13 @@ DATA(insert OID = 3661 (  "@@@"    PGNSP PGUID b f f 3615     3614     16 3660    0     ts_m
 DESCR("deprecated, use @@ instead");
 DATA(insert OID = 3674 (  "<"       PGNSP PGUID b f f 3615     3615     16 3679 3678     tsquery_lt scalarltsel
scalarltjoinsel)); 
 DESCR("less than");
-DATA(insert OID = 3675 (  "<="       PGNSP PGUID b f f 3615     3615     16 3678 3679     tsquery_le scalarltsel
scalarltjoinsel)); 
+DATA(insert OID = 3675 (  "<="       PGNSP PGUID b f f 3615     3615     16 3678 3679     tsquery_le scalarlesel
scalarlejoinsel)); 
 DESCR("less than or equal");
 DATA(insert OID = 3676 (  "="       PGNSP PGUID b t f 3615     3615     16 3676 3677     tsquery_eq eqsel eqjoinsel
));
 DESCR("equal");
 DATA(insert OID = 3677 (  "<>"       PGNSP PGUID b f f 3615     3615     16 3677 3676     tsquery_ne neqsel neqjoinsel
));
 DESCR("not equal");
-DATA(insert OID = 3678 (  ">="       PGNSP PGUID b f f 3615     3615     16 3675 3674     tsquery_ge scalargtsel
scalargtjoinsel)); 
+DATA(insert OID = 3678 (  ">="       PGNSP PGUID b f f 3615     3615     16 3675 3674     tsquery_ge scalargesel
scalargejoinsel)); 
 DESCR("greater than or equal");
 DATA(insert OID = 3679 (  ">"       PGNSP PGUID b f f 3615     3615     16 3674 3675     tsquery_gt scalargtsel
scalargtjoinsel)); 
 DESCR("greater than");
@@ -1726,9 +1726,9 @@ DESCR("less than");
 DATA(insert OID = 2991 (  ">"       PGNSP PGUID b f f 2249 2249 16 2990 2992 record_gt scalargtsel scalargtjoinsel ));
 DESCR("greater than");
 #define RECORD_GT_OP 2991
-DATA(insert OID = 2992 (  "<="       PGNSP PGUID b f f 2249 2249 16 2993 2991 record_le scalarltsel scalarltjoinsel
));
+DATA(insert OID = 2992 (  "<="       PGNSP PGUID b f f 2249 2249 16 2993 2991 record_le scalarlesel scalarlejoinsel
));
 DESCR("less than or equal");
-DATA(insert OID = 2993 (  ">="       PGNSP PGUID b f f 2249 2249 16 2992 2990 record_ge scalargtsel scalargtjoinsel
));
+DATA(insert OID = 2993 (  ">="       PGNSP PGUID b f f 2249 2249 16 2992 2990 record_ge scalargesel scalargejoinsel
));
 DESCR("greater than or equal");

 /* byte-oriented tests for identical rows and fast sorting */
@@ -1740,9 +1740,9 @@ DATA(insert OID = 3190 (  "*<"       PGNSP PGUID b f f 2249 2249 16 3191 3193 recor
 DESCR("less than");
 DATA(insert OID = 3191 (  "*>"       PGNSP PGUID b f f 2249 2249 16 3190 3192 record_image_gt scalargtsel
scalargtjoinsel)); 
 DESCR("greater than");
-DATA(insert OID = 3192 (  "*<="   PGNSP PGUID b f f 2249 2249 16 3193 3191 record_image_le scalarltsel scalarltjoinsel
));
+DATA(insert OID = 3192 (  "*<="   PGNSP PGUID b f f 2249 2249 16 3193 3191 record_image_le scalarlesel scalarlejoinsel
));
 DESCR("less than or equal");
-DATA(insert OID = 3193 (  "*>="   PGNSP PGUID b f f 2249 2249 16 3192 3190 record_image_ge scalargtsel scalargtjoinsel
));
+DATA(insert OID = 3193 (  "*>="   PGNSP PGUID b f f 2249 2249 16 3192 3190 record_image_ge scalargesel scalargejoinsel
));
 DESCR("greater than or equal");

 /* generic range type operators */
@@ -1753,10 +1753,10 @@ DESCR("not equal");
 DATA(insert OID = 3884 (  "<"       PGNSP PGUID b f f 3831 3831 16 3887 3886 range_lt rangesel scalarltjoinsel ));
 DESCR("less than");
 #define OID_RANGE_LESS_OP 3884
-DATA(insert OID = 3885 (  "<="       PGNSP PGUID b f f 3831 3831 16 3886 3887 range_le rangesel scalarltjoinsel ));
+DATA(insert OID = 3885 (  "<="       PGNSP PGUID b f f 3831 3831 16 3886 3887 range_le rangesel scalarlejoinsel ));
 DESCR("less than or equal");
 #define OID_RANGE_LESS_EQUAL_OP 3885
-DATA(insert OID = 3886 (  ">="       PGNSP PGUID b f f 3831 3831 16 3885 3884 range_ge rangesel scalargtjoinsel ));
+DATA(insert OID = 3886 (  ">="       PGNSP PGUID b f f 3831 3831 16 3885 3884 range_ge rangesel scalargejoinsel ));
 DESCR("greater than or equal");
 #define OID_RANGE_GREATER_EQUAL_OP 3886
 DATA(insert OID = 3887 (  ">"       PGNSP PGUID b f f 3831 3831 16 3884 3885 range_gt rangesel scalargtjoinsel ));
@@ -1829,9 +1829,9 @@ DATA(insert OID = 3242 (  "<"        PGNSP PGUID b f f 3802 3802 16 3243 3245 jsonb_lt
 DESCR("less than");
 DATA(insert OID = 3243 (  ">"        PGNSP PGUID b f f 3802 3802 16 3242 3244 jsonb_gt scalargtsel scalargtjoinsel ));
 DESCR("greater than");
-DATA(insert OID = 3244 (  "<="    PGNSP PGUID b f f 3802 3802 16 3245 3243 jsonb_le scalarltsel scalarltjoinsel ));
+DATA(insert OID = 3244 (  "<="    PGNSP PGUID b f f 3802 3802 16 3245 3243 jsonb_le scalarlesel scalarlejoinsel ));
 DESCR("less than or equal");
-DATA(insert OID = 3245 (  ">="    PGNSP PGUID b f f 3802 3802 16 3244 3242 jsonb_ge scalargtsel scalargtjoinsel ));
+DATA(insert OID = 3245 (  ">="    PGNSP PGUID b f f 3802 3802 16 3244 3242 jsonb_ge scalargesel scalargejoinsel ));
 DESCR("greater than or equal");
 DATA(insert OID = 3246 (  "@>"       PGNSP PGUID b f f 3802 3802 16 3250 0 jsonb_contains contsel contjoinsel ));
 DESCR("contains");
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h
index 8b33b4e..2ac9f16 100644
--- a/src/include/catalog/pg_proc.h
+++ b/src/include/catalog/pg_proc.h
@@ -264,6 +264,15 @@ DESCR("join selectivity of < and related operators on scalar datatypes");
 DATA(insert OID = 108 (  scalargtjoinsel   PGNSP PGUID 12 1 0 0 0 f f f f t f s s 5 0 701 "2281 26 2281 21 2281"
_null__null_ _null_ _null_ _null_ scalargtjoinsel _null_ _null_ _null_ )); 
 DESCR("join selectivity of > and related operators on scalar datatypes");

+DATA(insert OID = 336 (  scalarlesel       PGNSP PGUID 12 1 0 0 0 f f f f t f s s 4 0 701 "2281 26 2281 23" _null_
_null__null_ _null_ _null_    scalarlesel _null_ _null_ _null_ )); 
+DESCR("restriction selectivity of <= and related operators on scalar datatypes");
+DATA(insert OID = 337 (  scalargesel       PGNSP PGUID 12 1 0 0 0 f f f f t f s s 4 0 701 "2281 26 2281 23" _null_
_null__null_ _null_ _null_    scalargesel _null_ _null_ _null_ )); 
+DESCR("restriction selectivity of >= and related operators on scalar datatypes");
+DATA(insert OID = 386 (  scalarlejoinsel   PGNSP PGUID 12 1 0 0 0 f f f f t f s s 5 0 701 "2281 26 2281 21 2281"
_null__null_ _null_ _null_ _null_ scalarlejoinsel _null_ _null_ _null_ )); 
+DESCR("join selectivity of <= and related operators on scalar datatypes");
+DATA(insert OID = 398 (  scalargejoinsel   PGNSP PGUID 12 1 0 0 0 f f f f t f s s 5 0 701 "2281 26 2281 21 2281"
_null__null_ _null_ _null_ _null_ scalargejoinsel _null_ _null_ _null_ )); 
+DESCR("join selectivity of >= and related operators on scalar datatypes");
+
 DATA(insert OID =  109 (  unknownin           PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 705 "2275" _null_ _null_
_null__null_ _null_ unknownin _null_ _null_ _null_ )); 
 DESCR("I/O");
 DATA(insert OID =  110 (  unknownout       PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 2275 "705" _null_ _null_ _null_
_null__null_ unknownout _null_ _null_ _null_ )); 
diff --git a/src/tutorial/complex.source b/src/tutorial/complex.source
index 035c7a7..a2307b9 100644
--- a/src/tutorial/complex.source
+++ b/src/tutorial/complex.source
@@ -174,7 +174,7 @@ CREATE OPERATOR < (
 CREATE OPERATOR <= (
    leftarg = complex, rightarg = complex, procedure = complex_abs_le,
    commutator = >= , negator = > ,
-   restrict = scalarltsel, join = scalarltjoinsel
+   restrict = scalarlesel, join = scalarlejoinsel
 );
 CREATE OPERATOR = (
    leftarg = complex, rightarg = complex, procedure = complex_abs_eq,
@@ -186,7 +186,7 @@ CREATE OPERATOR = (
 CREATE OPERATOR >= (
    leftarg = complex, rightarg = complex, procedure = complex_abs_ge,
    commutator = <= , negator = < ,
-   restrict = scalargtsel, join = scalargtjoinsel
+   restrict = scalargesel, join = scalargejoinsel
 );
 CREATE OPERATOR > (
    leftarg = complex, rightarg = complex, procedure = complex_abs_gt,

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: AP
Date:
Subject: Re: [HACKERS] pgsql 10: hash indexes testing
Next
From: Michael Paquier
Date:
Subject: Re: [HACKERS] Re: Error-like LOG when connecting with SSL forpassword authentication