diff --git a/doc/src/sgml/xindex.sgml b/doc/src/sgml/xindex.sgml
index e4d36e1cc5..608465dd1b 100644
--- a/doc/src/sgml/xindex.sgml
+++ b/doc/src/sgml/xindex.sgml
@@ -1,5 +1,5 @@
@@ -542,25 +542,25 @@ CREATE OPERATOR = (
oprleft = (SELECT oid FROM pg_type WHERE typname = 'complex_abs');
UPDATE pg_operator
- SET oprrest = 'intltsel'::regproc, oprjoin = 'intltjoinsel'
+ SET oprrest = 'scalarltsel'::regproc, oprjoin = 'scalarltjoinsel'
WHERE oprname = '<' AND
oprleft = oprright AND
oprleft = (SELECT oid FROM pg_type WHERE typname = 'complex_abs');
UPDATE pg_operator
- SET oprrest = 'intltsel'::regproc, oprjoin = 'intltjoinsel'
+ SET oprrest = 'scalarltsel'::regproc, oprjoin = 'scalarltjoinsel'
WHERE oprname = '<=' AND
oprleft = oprright AND
oprleft = (SELECT oid FROM pg_type WHERE typname = 'complex_abs');
UPDATE pg_operator
- SET oprrest = 'intgtsel'::regproc, oprjoin = 'intgtjoinsel'
+ SET oprrest = 'scalargtsel'::regproc, oprjoin = 'scalargtjoinsel'
WHERE oprname = '>' AND
oprleft = oprright AND
oprleft = (SELECT oid FROM pg_type WHERE typname = 'complex_abs');
UPDATE pg_operator
- SET oprrest = 'intgtsel'::regproc, oprjoin = 'intgtjoinsel'
+ SET oprrest = 'scalargtsel'::regproc, oprjoin = 'scalargtjoinsel'
WHERE oprname = '>=' AND
oprleft = oprright AND
oprleft = (SELECT oid FROM pg_type WHERE typname = 'complex_abs');
diff --git a/doc/src/sgml/xoper.sgml b/doc/src/sgml/xoper.sgml
index 3ef53b83f7..45d05b6c3b 100644
--- a/doc/src/sgml/xoper.sgml
+++ b/doc/src/sgml/xoper.sgml
@@ -231,8 +231,8 @@ SELECT (a + b) AS c FROM test_complex;
eqsel for =
neqsel for <>
- intltsel for < or <=
- intgtsel for > or >=
+ scalarltsel for < or <=
+ scalargtsel for > or >=
It might seem a little odd that these are the categories, but they
make sense if you think about it. '=' will typically accept only
@@ -254,6 +254,17 @@ SELECT (a + b) AS c FROM test_complex;
matching operators (~, ~*, etc) use eqsel on the assumption that they'll
usually only match a small fraction of the entries in a table.
+
+
+ You can use scalarltsel and scalargtsel for comparisons on datatypes that
+ have some sensible means of being converted into numeric scalars for
+ range comparisons. If possible, add the datatype to those understood
+ by the routine convert_to_scalar() in src/backend/utils/adt/selfuncs.c.
+ (Eventually, this routine should be replaced by per-datatype functions
+ identified through a column of the pg_type table; but that hasn't happened
+ yet.) If you do not do this, things will still work, but the optimizer's
+ estimates won't be as good as they could be.
+
@@ -281,8 +292,8 @@ SELECT (a + b) AS c FROM test_complex;
eqjoinsel for =
neqjoinsel for <>
- intltjoinsel for < or <=
- intgtjoinsel for > or >=
+ scalarltjoinsel for < or <=
+ scalargtjoinsel for > or >=
diff --git a/src/backend/optimizer/path/clausesel.c b/src/backend/optimizer/path/clausesel.c
index d3a494f9bc..edce3d2129 100644
--- a/src/backend/optimizer/path/clausesel.c
+++ b/src/backend/optimizer/path/clausesel.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.28 2000/01/23 02:06:58 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.29 2000/01/24 07:16:46 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -23,6 +23,23 @@
#include "utils/lsyscache.h"
+/*
+ * Data structure for accumulating info about possible range-query
+ * clause pairs in clauselist_selectivity.
+ */
+typedef struct RangeQueryClause {
+ struct RangeQueryClause *next; /* next in linked list */
+ Node *var; /* The common variable of the clauses */
+ bool have_lobound; /* found a low-bound clause yet? */
+ bool have_hibound; /* found a high-bound clause yet? */
+ Selectivity lobound; /* Selectivity of a var > something clause */
+ Selectivity hibound; /* Selectivity of a var < something clause */
+} RangeQueryClause;
+
+static void addRangeClause(RangeQueryClause **rqlist, Node *clause,
+ int flag, bool isLTsel, Selectivity s2);
+
+
/****************************************************************************
* ROUTINES TO COMPUTE SELECTIVITIES
****************************************************************************/
@@ -55,29 +72,237 @@ restrictlist_selectivity(Query *root,
* must be returned.
*
* See clause_selectivity() for the meaning of the varRelid parameter.
+ *
+ * Our basic approach is to take the product of the selectivities of the
+ * subclauses. However, that's only right if the subclauses have independent
+ * probabilities, and in reality they are often NOT independent. So,
+ * we want to be smarter where we can.
+
+ * Currently, the only extra smarts we have is to 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 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 find a pair, we know that the
+ * selectivities represent the relative positions of the low and high bounds
+ * within the column's range, so instead of figuring the selectivity as
+ * hisel * losel, we can figure it as hisel + losel - 1. (To visualize this,
+ * see that hisel is the fraction of the range below the high bound, while
+ * losel is the fraction above the low bound; so hisel can be interpreted
+ * directly as a 0..1 value but we need to convert losel to 1-losel before
+ * interpreting it as a value. Then the available range is 1-losel to hisel.)
+ * If the calculation yields zero or negative, however, we chicken out and
+ * use the default interpretation; that probably means that one or both
+ * selectivities is a default estimate rather than an actual range value.
+ * Of course this is all very dependent on the behavior of
+ * scalarltsel/scalargtsel; perhaps some day we can generalize the approach.
*/
Selectivity
clauselist_selectivity(Query *root,
List *clauses,
int varRelid)
{
- Selectivity s1 = 1.0;
- List *clause;
+ Selectivity s1 = 1.0;
+ RangeQueryClause *rqlist = NULL;
+ List *clist;
- /* Use the product of the selectivities of the subclauses.
- * XXX this is too optimistic, since the subclauses
- * are very likely not independent...
+ /*
+ * Initial scan over clauses. Anything that doesn't look like a
+ * potential rangequery clause gets multiplied into s1 and forgotten.
+ * Anything that does gets inserted into an rqlist entry.
*/
- foreach(clause, clauses)
+ foreach(clist, clauses)
{
- Selectivity s2 = clause_selectivity(root,
- (Node *) lfirst(clause),
- varRelid);
+ Node *clause = (Node *) lfirst(clist);
+ Selectivity s2;
+
+ /*
+ * See if it looks like a restriction clause with a constant.
+ * (If it's not a constant we can't really trust the selectivity!)
+ * NB: for consistency of results, this fragment of code had
+ * better match what clause_selectivity() would do.
+ */
+ if (varRelid != 0 || NumRelids(clause) == 1)
+ {
+ int relidx;
+ AttrNumber attno;
+ Datum constval;
+ int flag;
+
+ get_relattval(clause, varRelid,
+ &relidx, &attno, &constval, &flag);
+ if (relidx != 0 && (flag & SEL_CONSTANT))
+ {
+ /* if get_relattval succeeded, it must be an opclause */
+ Oid opno = ((Oper *) ((Expr *) clause)->oper)->opno;
+ RegProcedure oprrest = get_oprrest(opno);
+
+ if (!oprrest)
+ s2 = (Selectivity) 0.5;
+ else
+ s2 = restriction_selectivity(oprrest, opno,
+ getrelid(relidx,
+ root->rtable),
+ attno,
+ constval, flag);
+ /*
+ * If we reach here, we have computed the same result
+ * that clause_selectivity would, so we can just use s2
+ * if it's the wrong oprrest. But if it's the right
+ * oprrest, add the clause to rqlist for later processing.
+ */
+ switch (oprrest)
+ {
+ case F_SCALARLTSEL:
+ addRangeClause(&rqlist, clause, flag, true, s2);
+ break;
+ case F_SCALARGTSEL:
+ addRangeClause(&rqlist, clause, flag, false, s2);
+ break;
+ default:
+ /* Just merge the selectivity in generically */
+ s1 = s1 * s2;
+ break;
+ }
+ continue; /* drop to loop bottom */
+ }
+ }
+ /* Not the right form, so treat it generically. */
+ s2 = clause_selectivity(root, clause, varRelid);
s1 = s1 * s2;
}
+
+ /*
+ * Now scan the rangequery pair list.
+ */
+ while (rqlist != NULL)
+ {
+ RangeQueryClause *rqnext;
+
+ if (rqlist->have_lobound && rqlist->have_hibound)
+ {
+ /* Successfully matched a pair of range clauses */
+ Selectivity s2 = rqlist->hibound + rqlist->lobound - 1.0;
+
+ if (s2 > 0.0)
+ {
+ /* All our hard work has paid off! */
+ s1 *= s2;
+ }
+ else
+ {
+ /* One or both is probably a default estimate,
+ * so punt and just merge them in generically.
+ */
+ s1 *= rqlist->hibound * rqlist->lobound;
+ }
+ }
+ else
+ {
+ /* Only found one of a pair, merge it in generically */
+ if (rqlist->have_lobound)
+ s1 *= rqlist->lobound;
+ else
+ s1 *= rqlist->hibound;
+ }
+ /* release storage and advance */
+ rqnext = rqlist->next;
+ pfree(rqlist);
+ rqlist = rqnext;
+ }
+
return s1;
}
+/*
+ * addRangeClause --- add a new range clause for clauselist_selectivity
+ *
+ * Here is where we try to match up pairs of range-query clauses
+ */
+static void
+addRangeClause(RangeQueryClause **rqlist, Node *clause,
+ int flag, bool isLTsel, Selectivity s2)
+{
+ RangeQueryClause *rqelem;
+ Node *var;
+ bool is_lobound;
+
+ /* get_relattval sets flag&SEL_RIGHT if the var is on the LEFT. */
+ if (flag & SEL_RIGHT)
+ {
+ var = (Node *) get_leftop((Expr *) clause);
+ is_lobound = ! isLTsel; /* x < something is high bound */
+ }
+ else
+ {
+ var = (Node *) get_rightop((Expr *) clause);
+ is_lobound = isLTsel; /* something < x is low bound */
+ }
+
+ for (rqelem = *rqlist; rqelem; rqelem = rqelem->next)
+ {
+ /* We use full equal() here because the "var" might be a function
+ * of one or more attributes of the same relation...
+ */
+ if (! equal(var, rqelem->var))
+ continue;
+ /* Found the right group to put this clause in */
+ if (is_lobound)
+ {
+ if (! rqelem->have_lobound)
+ {
+ rqelem->have_lobound = true;
+ rqelem->lobound = s2;
+ }
+ else
+ {
+ /* We have found two similar clauses, such as
+ * x < y AND x < z. Keep only the more restrictive one.
+ */
+ if (rqelem->lobound > s2)
+ rqelem->lobound = s2;
+ }
+ }
+ else
+ {
+ if (! rqelem->have_hibound)
+ {
+ rqelem->have_hibound = true;
+ rqelem->hibound = s2;
+ }
+ else
+ {
+ /* We have found two similar clauses, such as
+ * x > y AND x > z. Keep only the more restrictive one.
+ */
+ if (rqelem->hibound > s2)
+ rqelem->hibound = s2;
+ }
+ }
+ return;
+ }
+
+ /* No matching var found, so make a new clause-pair data structure */
+ rqelem = (RangeQueryClause *) palloc(sizeof(RangeQueryClause));
+ rqelem->var = var;
+ if (is_lobound)
+ {
+ rqelem->have_lobound = true;
+ rqelem->have_hibound = false;
+ rqelem->lobound = s2;
+ }
+ else
+ {
+ rqelem->have_lobound = false;
+ rqelem->have_hibound = true;
+ rqelem->hibound = s2;
+ }
+ rqelem->next = *rqlist;
+ *rqlist = rqelem;
+}
+
+
/*
* clause_selectivity -
* Compute the selectivity of a general boolean expression clause.
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c
index c6b9520a26..346bda3bc7 100644
--- a/src/backend/utils/adt/selfuncs.c
+++ b/src/backend/utils/adt/selfuncs.c
@@ -14,7 +14,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.52 2000/01/24 02:12:55 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.53 2000/01/24 07:16:46 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -47,15 +47,13 @@
/* default selectivity estimate for inequalities such as "A < b" */
#define DEFAULT_INEQ_SEL (1.0 / 3.0)
-static bool convert_to_scale(Datum value, Oid typid,
- double *scaleval);
static void getattproperties(Oid relid, AttrNumber attnum,
Oid *typid,
int *typlen,
bool *typbyval,
int32 *typmod);
static bool getattstatistics(Oid relid, AttrNumber attnum,
- Oid opid, Oid typid, int32 typmod,
+ Oid typid, int32 typmod,
double *nullfrac,
double *commonfrac,
Datum *commonval,
@@ -100,7 +98,7 @@ eqsel(Oid opid,
&typid, &typlen, &typbyval, &typmod);
/* get stats for the attribute, if available */
- if (getattstatistics(relid, attno, opid, typid, typmod,
+ if (getattstatistics(relid, attno, typid, typmod,
&nullfrac, &commonfrac, &commonval,
NULL, NULL))
{
@@ -212,19 +210,18 @@ neqsel(Oid opid,
}
/*
- * intltsel - Selectivity of "<" (also "<=") for integers.
+ * scalarltsel - Selectivity of "<" (also "<=") for scalars.
*
- * Actually, this works and is used for all numeric types, so it should
- * be renamed. In fact, it is also currently called for all manner of
- * non-numeric types, for which it is NOT very helpful. That needs
- * to be fixed.
+ * 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.
*/
float64
-intltsel(Oid opid,
- Oid relid,
- AttrNumber attno,
- Datum value,
- int32 flag)
+scalarltsel(Oid opid,
+ Oid relid,
+ AttrNumber attno,
+ Datum value,
+ int32 flag)
{
float64 result;
@@ -253,19 +250,19 @@ intltsel(Oid opid,
*/
oprtuple = get_operator_tuple(opid);
if (! HeapTupleIsValid(oprtuple))
- elog(ERROR, "intltsel: no tuple for operator %u", opid);
+ elog(ERROR, "scalarltsel: no tuple for operator %u", opid);
ltype = ((Form_pg_operator) GETSTRUCT(oprtuple))->oprleft;
rtype = ((Form_pg_operator) GETSTRUCT(oprtuple))->oprright;
/* Convert the constant to a uniform comparison scale. */
- if (! convert_to_scale(value,
- ((flag & SEL_RIGHT) ? rtype : ltype),
- &val))
+ if (! convert_to_scalar(value,
+ ((flag & SEL_RIGHT) ? rtype : ltype),
+ &val))
{
- /* Ideally we'd produce an error here, on the grounds that
- * the given operator shouldn't have intltsel registered as its
+ /* Ideally we'd produce an error here, on the grounds that the
+ * given operator shouldn't have scalarltsel registered as its
* selectivity func unless we can deal with its operand types.
- * But currently, all manner of stuff is invoking intltsel,
+ * But currently, all manner of stuff is invoking scalarltsel,
* so give a default estimate until that can be fixed.
*/
*result = DEFAULT_INEQ_SEL;
@@ -276,7 +273,7 @@ intltsel(Oid opid,
getattproperties(relid, attno,
&typid, &typlen, &typbyval, &typmod);
- if (! getattstatistics(relid, attno, opid, typid, typmod,
+ if (! getattstatistics(relid, attno, typid, typmod,
NULL, NULL, NULL,
&loval, &hival))
{
@@ -286,8 +283,8 @@ intltsel(Oid opid,
}
/* Convert the attribute's loval/hival to common scale. */
- if (! convert_to_scale(loval, typid, &low) ||
- ! convert_to_scale(hival, typid, &high))
+ if (! convert_to_scalar(loval, typid, &low) ||
+ ! convert_to_scalar(hival, typid, &high))
{
/* See above comments... */
if (! typbyval)
@@ -341,23 +338,23 @@ intltsel(Oid opid,
}
/*
- * intgtsel - Selectivity of ">" (also ">=") for integers.
+ * scalargtsel - Selectivity of ">" (also ">=") for integers.
*
- * See above comments for intltsel.
+ * See above comments for scalarltsel.
*/
float64
-intgtsel(Oid opid,
- Oid relid,
- AttrNumber attno,
- Datum value,
- int32 flag)
+scalargtsel(Oid opid,
+ Oid relid,
+ AttrNumber attno,
+ Datum value,
+ int32 flag)
{
float64 result;
/* Compute selectivity of "<", then invert --- but only if we
* were able to produce a non-default estimate.
*/
- result = intltsel(opid, relid, attno, value, flag);
+ result = scalarltsel(opid, relid, attno, value, flag);
if (*result != DEFAULT_INEQ_SEL)
*result = 1.0 - *result;
return result;
@@ -429,14 +426,14 @@ neqjoinsel(Oid opid,
}
/*
- * intltjoinsel - Join selectivity of "<" and "<="
+ * scalarltjoinsel - Join selectivity of "<" and "<=" for scalars
*/
float64
-intltjoinsel(Oid opid,
- Oid relid1,
- AttrNumber attno1,
- Oid relid2,
- AttrNumber attno2)
+scalarltjoinsel(Oid opid,
+ Oid relid1,
+ AttrNumber attno1,
+ Oid relid2,
+ AttrNumber attno2)
{
float64 result;
@@ -446,14 +443,14 @@ intltjoinsel(Oid opid,
}
/*
- * intgtjoinsel - Join selectivity of ">" and ">="
+ * scalargtjoinsel - Join selectivity of ">" and ">=" for scalars
*/
float64
-intgtjoinsel(Oid opid,
- Oid relid1,
- AttrNumber attno1,
- Oid relid2,
- AttrNumber attno2)
+scalargtjoinsel(Oid opid,
+ Oid relid1,
+ AttrNumber attno1,
+ Oid relid2,
+ AttrNumber attno2)
{
float64 result;
@@ -463,21 +460,25 @@ intgtjoinsel(Oid opid,
}
/*
- * convert_to_scale
- * Convert a given value of the indicated type to the comparison
- * scale needed by intltsel(). Returns "true" if successful.
+ * convert_to_scalar
+ * Convert a non-NULL value of the indicated type to the comparison
+ * scale needed by scalarltsel()/scalargtsel().
+ * Returns "true" if successful.
*
* All numeric datatypes are simply converted to their equivalent
- * "double" values.
- * Future extension: convert string-like types to some suitable scale.
+ * "double" values. String datatypes are converted to a crude scale
+ * using their first character (only if it is in the ASCII range,
+ * to try to avoid problems with non-ASCII collating sequences).
*/
-static bool
-convert_to_scale(Datum value, Oid typid,
- double *scaleval)
+bool
+convert_to_scalar(Datum value, Oid typid,
+ double *scaleval)
{
- /* Fast-path conversions for some built-in types */
switch (typid)
{
+ /*
+ * Built-in numeric types
+ */
case BOOLOID:
*scaleval = (double) DatumGetUInt8(value);
return true;
@@ -504,18 +505,54 @@ convert_to_scale(Datum value, Oid typid,
/* we can treat OIDs as integers... */
*scaleval = (double) DatumGetObjectId(value);
return true;
- case TEXTOID:
- /*
- * Eventually this should get handled by somehow scaling as a
- * string value. For now, we need to call it out to avoid
- * falling into the default case, because there is a float8(text)
- * function declared in pg_proc that will do the wrong thing :-(
- */
+
+ /*
+ * Built-in string types
+ */
+ case CHAROID:
+ {
+ char ch = DatumGetChar(value);
+
+ if (ch >= 0 && ch < 127)
+ {
+ *scaleval = (double) ch;
+ return true;
+ }
break;
+ }
+ case BPCHAROID:
+ case VARCHAROID:
+ case TEXTOID:
+ if (VARSIZE(DatumGetPointer(value)) > VARHDRSZ)
+ {
+ char ch = * (char *) VARDATA(DatumGetPointer(value));
+
+ if (ch >= 0 && ch < 127)
+ {
+ *scaleval = (double) ch;
+ return true;
+ }
+ }
+ break;
+ case NAMEOID:
+ {
+ NameData *nm = (NameData *) DatumGetPointer(value);
+ char ch = NameStr(*nm)[0];
+
+ if (ch >= 0 && ch < 127)
+ {
+ *scaleval = (double) ch;
+ return true;
+ }
+ break;
+ }
+
default:
{
- /* See whether there is a registered type-conversion function,
+ /*
+ * See whether there is a registered type-conversion function,
* namely a procedure named "float8" with the right signature.
+ * If so, assume we can convert the value to the numeric scale.
*/
Oid oid_array[FUNC_MAX_ARGS];
HeapTuple ftup;
@@ -589,7 +626,9 @@ getattproperties(Oid relid, AttrNumber attnum,
* after use if the data type is not by-value.)
*/
static bool
-getattstatistics(Oid relid, AttrNumber attnum, Oid opid, Oid typid,
+getattstatistics(Oid relid,
+ AttrNumber attnum,
+ Oid typid,
int32 typmod,
double *nullfrac,
double *commonfrac,
@@ -603,8 +642,15 @@ getattstatistics(Oid relid, AttrNumber attnum, Oid opid, Oid typid,
Oid typelem;
bool isnull;
- /* We assume that there will only be one entry in pg_statistic
- * for the given rel/att. Someday, VACUUM might store more than one...
+ /*
+ * We assume that there will only be one entry in pg_statistic for
+ * the given rel/att, so we search WITHOUT considering the staop
+ * column. Someday, VACUUM might store more than one entry per rel/att,
+ * corresponding to more than one possible sort ordering defined for
+ * the column type. However, to make that work we will need to figure
+ * out which staop to search for --- it's not necessarily the one we
+ * have at hand! (For example, we might have a '>' operator rather than
+ * the '<' operator that will appear in staop.)
*/
tuple = SearchSysCacheTuple(STATRELID,
ObjectIdGetDatum(relid),
diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h
index 87d0f84b1c..bbb3f2c90b 100644
--- a/src/include/catalog/catversion.h
+++ b/src/include/catalog/catversion.h
@@ -36,7 +36,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: catversion.h,v 1.10 2000/01/24 02:12:57 momjian Exp $
+ * $Id: catversion.h,v 1.11 2000/01/24 07:16:51 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -52,6 +52,6 @@
*/
/* yyyymmddN */
-#define CATALOG_VERSION_NO 200001251
+#define CATALOG_VERSION_NO 200001241
#endif
diff --git a/src/include/catalog/pg_operator.h b/src/include/catalog/pg_operator.h
index 6c7619be33..370e081c01 100644
--- a/src/include/catalog/pg_operator.h
+++ b/src/include/catalog/pg_operator.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_operator.h,v 1.64 2000/01/10 16:13:20 momjian Exp $
+ * $Id: pg_operator.h,v 1.65 2000/01/24 07:16:51 tgl Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -90,13 +90,13 @@ typedef FormData_pg_operator *Form_pg_operator;
DATA(insert OID = 15 ( "=" PGUID 0 b t f 23 20 16 416 36 97 412 int48eq eqsel eqjoinsel ));
DATA(insert OID = 36 ( "<>" PGUID 0 b t f 23 20 16 417 15 0 0 int48ne neqsel neqjoinsel ));
-DATA(insert OID = 37 ( "<" PGUID 0 b t f 23 20 16 419 82 0 0 int48lt intltsel intltjoinsel ));
-DATA(insert OID = 76 ( ">" PGUID 0 b t f 23 20 16 418 80 0 0 int48gt intgtsel intgtjoinsel ));
-DATA(insert OID = 80 ( "<=" PGUID 0 b t f 23 20 16 430 76 0 0 int48le intltsel intltjoinsel ));
-DATA(insert OID = 82 ( ">=" PGUID 0 b t f 23 20 16 420 37 0 0 int48ge intgtsel intgtjoinsel ));
+DATA(insert OID = 37 ( "<" PGUID 0 b t f 23 20 16 419 82 0 0 int48lt scalarltsel scalarltjoinsel ));
+DATA(insert OID = 76 ( ">" PGUID 0 b t f 23 20 16 418 80 0 0 int48gt scalargtsel scalargtjoinsel ));
+DATA(insert OID = 80 ( "<=" PGUID 0 b t f 23 20 16 430 76 0 0 int48le scalarltsel scalarltjoinsel ));
+DATA(insert OID = 82 ( ">=" PGUID 0 b t f 23 20 16 420 37 0 0 int48ge scalargtsel scalargtjoinsel ));
-DATA(insert OID = 58 ( "<" PGUID 0 b t f 16 16 16 59 0 0 0 boollt intltsel intltjoinsel ));
-DATA(insert OID = 59 ( ">" PGUID 0 b t f 16 16 16 58 0 0 0 boolgt intgtsel intgtjoinsel ));
+DATA(insert OID = 58 ( "<" PGUID 0 b t f 16 16 16 59 0 0 0 boollt scalarltsel scalarltjoinsel ));
+DATA(insert OID = 59 ( ">" PGUID 0 b t f 16 16 16 58 0 0 0 boolgt scalargtsel scalargtjoinsel ));
DATA(insert OID = 85 ( "<>" PGUID 0 b t f 16 16 16 85 91 0 0 boolne neqsel neqjoinsel ));
DATA(insert OID = 91 ( "=" PGUID 0 b t t 16 16 16 91 85 58 58 booleq eqsel eqjoinsel ));
#define BooleanEqualOperator 91
@@ -104,9 +104,9 @@ DATA(insert OID = 91 ( "=" PGUID 0 b t t 16 16 16 91 85 58 58 booleq
DATA(insert OID = 92 ( "=" PGUID 0 b t t 18 18 16 92 630 631 631 chareq eqsel eqjoinsel ));
DATA(insert OID = 93 ( "=" PGUID 0 b t t 19 19 16 93 643 660 660 nameeq eqsel eqjoinsel ));
DATA(insert OID = 94 ( "=" PGUID 0 b t t 21 21 16 94 519 95 95 int2eq eqsel eqjoinsel ));
-DATA(insert OID = 95 ( "<" PGUID 0 b t f 21 21 16 520 524 0 0 int2lt intltsel intltjoinsel ));
+DATA(insert OID = 95 ( "<" PGUID 0 b t f 21 21 16 520 524 0 0 int2lt scalarltsel scalarltjoinsel ));
DATA(insert OID = 96 ( "=" PGUID 0 b t t 23 23 16 96 518 97 97 int4eq eqsel eqjoinsel ));
-DATA(insert OID = 97 ( "<" PGUID 0 b t f 23 23 16 521 525 0 0 int4lt intltsel intltjoinsel ));
+DATA(insert OID = 97 ( "<" PGUID 0 b t f 23 23 16 521 525 0 0 int4lt scalarltsel scalarltjoinsel ));
DATA(insert OID = 98 ( "=" PGUID 0 b t t 25 25 16 98 531 664 664 texteq eqsel eqjoinsel ));
DATA(insert OID = 329 ( "=" PGUID 0 b t f 1000 1000 16 329 0 0 0 array_eq eqsel eqjoinsel ));
@@ -141,17 +141,17 @@ DATA(insert OID = 387 ( "=" PGUID 0 b t t 27 27 16 387 0 0 0 tideq eqse
DATA(insert OID = 410 ( "=" PGUID 0 b t t 20 20 16 410 411 412 412 int8eq eqsel eqjoinsel ));
DATA(insert OID = 411 ( "<>" PGUID 0 b t f 20 20 16 411 410 0 0 int8ne neqsel neqjoinsel ));
-DATA(insert OID = 412 ( "<" PGUID 0 b t f 20 20 16 413 415 0 0 int8lt intltsel intltjoinsel ));
-DATA(insert OID = 413 ( ">" PGUID 0 b t f 20 20 16 412 414 0 0 int8gt intgtsel intgtjoinsel ));
-DATA(insert OID = 414 ( "<=" PGUID 0 b t f 20 20 16 415 413 0 0 int8le intltsel intltjoinsel ));
-DATA(insert OID = 415 ( ">=" PGUID 0 b t f 20 20 16 414 412 0 0 int8ge intgtsel intgtjoinsel ));
+DATA(insert OID = 412 ( "<" PGUID 0 b t f 20 20 16 413 415 0 0 int8lt scalarltsel scalarltjoinsel ));
+DATA(insert OID = 413 ( ">" PGUID 0 b t f 20 20 16 412 414 0 0 int8gt scalargtsel scalargtjoinsel ));
+DATA(insert OID = 414 ( "<=" PGUID 0 b t f 20 20 16 415 413 0 0 int8le scalarltsel scalarltjoinsel ));
+DATA(insert OID = 415 ( ">=" PGUID 0 b t f 20 20 16 414 412 0 0 int8ge scalargtsel scalargtjoinsel ));
DATA(insert OID = 416 ( "=" PGUID 0 b t f 20 23 16 15 417 412 97 int84eq eqsel eqjoinsel ));
DATA(insert OID = 417 ( "<>" PGUID 0 b t f 20 23 16 36 416 0 0 int84ne neqsel neqjoinsel ));
-DATA(insert OID = 418 ( "<" PGUID 0 b t f 20 23 16 76 430 0 0 int84lt intltsel intltjoinsel ));
-DATA(insert OID = 419 ( ">" PGUID 0 b t f 20 23 16 37 420 0 0 int84gt intgtsel intgtjoinsel ));
-DATA(insert OID = 420 ( "<=" PGUID 0 b t f 20 23 16 82 419 0 0 int84le intltsel intltjoinsel ));
-DATA(insert OID = 430 ( ">=" PGUID 0 b t f 20 23 16 80 418 0 0 int84ge intgtsel intgtjoinsel ));
+DATA(insert OID = 418 ( "<" PGUID 0 b t f 20 23 16 76 430 0 0 int84lt scalarltsel scalarltjoinsel ));
+DATA(insert OID = 419 ( ">" PGUID 0 b t f 20 23 16 37 420 0 0 int84gt scalargtsel scalargtjoinsel ));
+DATA(insert OID = 420 ( "<=" PGUID 0 b t f 20 23 16 82 419 0 0 int84le scalarltsel scalarltjoinsel ));
+DATA(insert OID = 430 ( ">=" PGUID 0 b t f 20 23 16 80 418 0 0 int84ge scalargtsel scalargtjoinsel ));
DATA(insert OID = 484 ( "-" PGUID 0 l t f 0 20 20 0 0 0 0 int8um - - ));
DATA(insert OID = 485 ( "<<" PGUID 0 b t f 604 604 16 0 0 0 0 poly_left - - ));
@@ -189,12 +189,12 @@ DATA(insert OID = 516 ( "!!" PGUID 0 l t f 0 23 23 0 0 0 0 int4f
DATA(insert OID = 517 ( "<->" PGUID 0 b t f 600 600 701 517 0 0 0 point_distance - - ));
DATA(insert OID = 518 ( "<>" PGUID 0 b t f 23 23 16 518 96 0 0 int4ne neqsel neqjoinsel ));
DATA(insert OID = 519 ( "<>" PGUID 0 b t f 21 21 16 519 94 0 0 int2ne neqsel neqjoinsel ));
-DATA(insert OID = 520 ( ">" PGUID 0 b t f 21 21 16 95 522 0 0 int2gt intgtsel intgtjoinsel ));
-DATA(insert OID = 521 ( ">" PGUID 0 b t f 23 23 16 97 523 0 0 int4gt intgtsel intgtjoinsel ));
-DATA(insert OID = 522 ( "<=" PGUID 0 b t f 21 21 16 524 520 0 0 int2le intltsel intltjoinsel ));
-DATA(insert OID = 523 ( "<=" PGUID 0 b t f 23 23 16 525 521 0 0 int4le intltsel intltjoinsel ));
-DATA(insert OID = 524 ( ">=" PGUID 0 b t f 21 21 16 522 95 0 0 int2ge intgtsel intgtjoinsel ));
-DATA(insert OID = 525 ( ">=" PGUID 0 b t f 23 23 16 523 97 0 0 int4ge intgtsel intgtjoinsel ));
+DATA(insert OID = 520 ( ">" PGUID 0 b t f 21 21 16 95 522 0 0 int2gt scalargtsel scalargtjoinsel ));
+DATA(insert OID = 521 ( ">" PGUID 0 b t f 23 23 16 97 523 0 0 int4gt scalargtsel scalargtjoinsel ));
+DATA(insert OID = 522 ( "<=" PGUID 0 b t f 21 21 16 524 520 0 0 int2le scalarltsel scalarltjoinsel ));
+DATA(insert OID = 523 ( "<=" PGUID 0 b t f 23 23 16 525 521 0 0 int4le scalarltsel scalarltjoinsel ));
+DATA(insert OID = 524 ( ">=" PGUID 0 b t f 21 21 16 522 95 0 0 int2ge scalargtsel scalargtjoinsel ));
+DATA(insert OID = 525 ( ">=" PGUID 0 b t f 23 23 16 523 97 0 0 int4ge scalargtsel scalargtjoinsel ));
DATA(insert OID = 526 ( "*" PGUID 0 b t f 21 21 21 526 0 0 0 int2mul - - ));
DATA(insert OID = 527 ( "/" PGUID 0 b t f 21 21 21 0 0 0 0 int2div - - ));
DATA(insert OID = 528 ( "/" PGUID 0 b t f 23 23 23 0 0 0 0 int4div - - ));
@@ -203,16 +203,16 @@ DATA(insert OID = 530 ( "%" PGUID 0 b t f 23 23 23 0 0 0 0 int4mod
DATA(insert OID = 531 ( "<>" PGUID 0 b t f 25 25 16 531 98 0 0 textne neqsel neqjoinsel ));
DATA(insert OID = 532 ( "=" PGUID 0 b t f 21 23 16 533 538 95 97 int24eq eqsel eqjoinsel ));
DATA(insert OID = 533 ( "=" PGUID 0 b t f 23 21 16 532 539 97 95 int42eq eqsel eqjoinsel ));
-DATA(insert OID = 534 ( "<" PGUID 0 b t f 21 23 16 537 542 0 0 int24lt intltsel intltjoinsel ));
-DATA(insert OID = 535 ( "<" PGUID 0 b t f 23 21 16 536 543 0 0 int42lt intltsel intltjoinsel ));
-DATA(insert OID = 536 ( ">" PGUID 0 b t f 21 23 16 535 540 0 0 int24gt intgtsel intgtjoinsel ));
-DATA(insert OID = 537 ( ">" PGUID 0 b t f 23 21 16 534 541 0 0 int42gt intgtsel intgtjoinsel ));
+DATA(insert OID = 534 ( "<" PGUID 0 b t f 21 23 16 537 542 0 0 int24lt scalarltsel scalarltjoinsel ));
+DATA(insert OID = 535 ( "<" PGUID 0 b t f 23 21 16 536 543 0 0 int42lt scalarltsel scalarltjoinsel ));
+DATA(insert OID = 536 ( ">" PGUID 0 b t f 21 23 16 535 540 0 0 int24gt scalargtsel scalargtjoinsel ));
+DATA(insert OID = 537 ( ">" PGUID 0 b t f 23 21 16 534 541 0 0 int42gt scalargtsel scalargtjoinsel ));
DATA(insert OID = 538 ( "<>" PGUID 0 b t f 21 23 16 539 532 0 0 int24ne neqsel neqjoinsel ));
DATA(insert OID = 539 ( "<>" PGUID 0 b t f 23 21 16 538 533 0 0 int42ne neqsel neqjoinsel ));
-DATA(insert OID = 540 ( "<=" PGUID 0 b t f 21 23 16 543 536 0 0 int24le intltsel intltjoinsel ));
-DATA(insert OID = 541 ( "<=" PGUID 0 b t f 23 21 16 542 537 0 0 int42le intltsel intltjoinsel ));
-DATA(insert OID = 542 ( ">=" PGUID 0 b t f 21 23 16 541 534 0 0 int24ge intgtsel intgtjoinsel ));
-DATA(insert OID = 543 ( ">=" PGUID 0 b t f 23 21 16 540 535 0 0 int42ge intgtsel intgtjoinsel ));
+DATA(insert OID = 540 ( "<=" PGUID 0 b t f 21 23 16 543 536 0 0 int24le scalarltsel scalarltjoinsel ));
+DATA(insert OID = 541 ( "<=" PGUID 0 b t f 23 21 16 542 537 0 0 int42le scalarltsel scalarltjoinsel ));
+DATA(insert OID = 542 ( ">=" PGUID 0 b t f 21 23 16 541 534 0 0 int24ge scalargtsel scalargtjoinsel ));
+DATA(insert OID = 543 ( ">=" PGUID 0 b t f 23 21 16 540 535 0 0 int42ge scalargtsel scalargtjoinsel ));
DATA(insert OID = 544 ( "*" PGUID 0 b t f 21 23 23 545 0 0 0 int24mul - - ));
DATA(insert OID = 545 ( "*" PGUID 0 b t f 23 21 23 544 0 0 0 int42mul - - ));
DATA(insert OID = 546 ( "/" PGUID 0 b t f 21 23 23 0 0 0 0 int24div - - ));
@@ -231,16 +231,16 @@ DATA(insert OID = 558 ( "-" PGUID 0 l t f 0 23 23 0 0 0 0 int4um
DATA(insert OID = 559 ( "-" PGUID 0 l t f 0 21 21 0 0 0 0 int2um - - ));
DATA(insert OID = 560 ( "=" PGUID 0 b t t 702 702 16 560 561 562 562 abstimeeq eqsel eqjoinsel ));
DATA(insert OID = 561 ( "<>" PGUID 0 b t f 702 702 16 561 560 0 0 abstimene neqsel neqjoinsel ));
-DATA(insert OID = 562 ( "<" PGUID 0 b t f 702 702 16 563 565 0 0 abstimelt intltsel intltjoinsel ));
-DATA(insert OID = 563 ( ">" PGUID 0 b t f 702 702 16 562 564 0 0 abstimegt intgtsel intgtjoinsel ));
-DATA(insert OID = 564 ( "<=" PGUID 0 b t f 702 702 16 565 563 0 0 abstimele intltsel intltjoinsel ));
-DATA(insert OID = 565 ( ">=" PGUID 0 b t f 702 702 16 564 562 0 0 abstimege intgtsel intgtjoinsel ));
+DATA(insert OID = 562 ( "<" PGUID 0 b t f 702 702 16 563 565 0 0 abstimelt scalarltsel scalarltjoinsel ));
+DATA(insert OID = 563 ( ">" PGUID 0 b t f 702 702 16 562 564 0 0 abstimegt scalargtsel scalargtjoinsel ));
+DATA(insert OID = 564 ( "<=" PGUID 0 b t f 702 702 16 565 563 0 0 abstimele scalarltsel scalarltjoinsel ));
+DATA(insert OID = 565 ( ">=" PGUID 0 b t f 702 702 16 564 562 0 0 abstimege scalargtsel scalargtjoinsel ));
DATA(insert OID = 566 ( "=" PGUID 0 b t t 703 703 16 566 567 568 568 reltimeeq eqsel eqjoinsel ));
DATA(insert OID = 567 ( "<>" PGUID 0 b t f 703 703 16 567 566 0 0 reltimene neqsel neqjoinsel ));
-DATA(insert OID = 568 ( "<" PGUID 0 b t f 703 703 16 569 571 0 0 reltimelt intltsel intltjoinsel ));
-DATA(insert OID = 569 ( ">" PGUID 0 b t f 703 703 16 568 570 0 0 reltimegt intgtsel intgtjoinsel ));
-DATA(insert OID = 570 ( "<=" PGUID 0 b t f 703 703 16 571 569 0 0 reltimele intltsel intltjoinsel ));
-DATA(insert OID = 571 ( ">=" PGUID 0 b t f 703 703 16 570 568 0 0 reltimege intgtsel intgtjoinsel ));
+DATA(insert OID = 568 ( "<" PGUID 0 b t f 703 703 16 569 571 0 0 reltimelt scalarltsel scalarltjoinsel ));
+DATA(insert OID = 569 ( ">" PGUID 0 b t f 703 703 16 568 570 0 0 reltimegt scalargtsel scalargtjoinsel ));
+DATA(insert OID = 570 ( "<=" PGUID 0 b t f 703 703 16 571 569 0 0 reltimele scalarltsel scalarltjoinsel ));
+DATA(insert OID = 571 ( ">=" PGUID 0 b t f 703 703 16 570 568 0 0 reltimege scalargtsel scalargtjoinsel ));
DATA(insert OID = 572 ( "~=" PGUID 0 b t f 704 704 16 572 0 0 0 intervalsame eqsel eqjoinsel ));
DATA(insert OID = 573 ( "<<" PGUID 0 b t f 704 704 16 0 0 0 0 intervalct - - ));
DATA(insert OID = 574 ( "&&" PGUID 0 b t f 704 704 16 0 0 0 0 intervalov - - ));
@@ -276,17 +276,17 @@ DATA(insert OID = 606 ( "<#>" PGUID 0 b t f 702 702 704 0 0 0 0 mktinterval -
DATA(insert OID = 607 ( "=" PGUID 0 b t t 26 26 16 607 608 609 609 oideq eqsel eqjoinsel ));
#define MIN_OIDCMP 607 /* used by cache code */
DATA(insert OID = 608 ( "<>" PGUID 0 b t f 26 26 16 608 607 0 0 oidne neqsel neqjoinsel ));
-DATA(insert OID = 609 ( "<" PGUID 0 b t f 26 26 16 610 612 0 0 int4lt intltsel intltjoinsel ));
-DATA(insert OID = 610 ( ">" PGUID 0 b t f 26 26 16 609 611 0 0 int4gt intgtsel intgtjoinsel ));
-DATA(insert OID = 611 ( "<=" PGUID 0 b t f 26 26 16 612 610 0 0 int4le intltsel intltjoinsel ));
-DATA(insert OID = 612 ( ">=" PGUID 0 b t f 26 26 16 611 609 0 0 int4ge intgtsel intgtjoinsel ));
+DATA(insert OID = 609 ( "<" PGUID 0 b t f 26 26 16 610 612 0 0 int4lt scalarltsel scalarltjoinsel ));
+DATA(insert OID = 610 ( ">" PGUID 0 b t f 26 26 16 609 611 0 0 int4gt scalargtsel scalargtjoinsel ));
+DATA(insert OID = 611 ( "<=" PGUID 0 b t f 26 26 16 612 610 0 0 int4le scalarltsel scalarltjoinsel ));
+DATA(insert OID = 612 ( ">=" PGUID 0 b t f 26 26 16 611 609 0 0 int4ge scalargtsel scalargtjoinsel ));
#define MAX_OIDCMP 612 /* used by cache code */
DATA(insert OID = 644 ( "<>" PGUID 0 b t f 30 30 16 644 649 0 0 oidvectorne neqsel neqjoinsel ));
-DATA(insert OID = 645 ( "<" PGUID 0 b t f 30 30 16 646 648 0 0 oidvectorlt intltsel intltjoinsel ));
-DATA(insert OID = 646 ( ">" PGUID 0 b t f 30 30 16 645 647 0 0 oidvectorgt intgtsel intgtjoinsel ));
-DATA(insert OID = 647 ( "<=" PGUID 0 b t f 30 30 16 648 646 0 0 oidvectorle intltsel intltjoinsel ));
-DATA(insert OID = 648 ( ">=" PGUID 0 b t f 30 30 16 647 645 0 0 oidvectorge intgtsel intgtjoinsel ));
+DATA(insert OID = 645 ( "<" PGUID 0 b t f 30 30 16 646 648 0 0 oidvectorlt - - ));
+DATA(insert OID = 646 ( ">" PGUID 0 b t f 30 30 16 645 647 0 0 oidvectorgt - - ));
+DATA(insert OID = 647 ( "<=" PGUID 0 b t f 30 30 16 648 646 0 0 oidvectorle - - ));
+DATA(insert OID = 648 ( ">=" PGUID 0 b t f 30 30 16 647 645 0 0 oidvectorge - - ));
DATA(insert OID = 649 ( "=" PGUID 0 b t t 30 30 16 649 644 645 645 oidvectoreq eqsel eqjoinsel ));
DATA(insert OID = 613 ( "<->" PGUID 0 b t f 600 628 701 0 0 0 0 dist_pl - - ));
@@ -298,18 +298,18 @@ DATA(insert OID = 618 ( "<->" PGUID 0 b t f 600 602 701 0 0 0 0 dist_p
DATA(insert OID = 620 ( "=" PGUID 0 b t f 700 700 16 620 621 622 622 float4eq eqsel eqjoinsel ));
DATA(insert OID = 621 ( "<>" PGUID 0 b t f 700 700 16 621 620 0 0 float4ne neqsel neqjoinsel ));
-DATA(insert OID = 622 ( "<" PGUID 0 b t f 700 700 16 623 625 0 0 float4lt intltsel intltjoinsel ));
-DATA(insert OID = 623 ( ">" PGUID 0 b t f 700 700 16 622 624 0 0 float4gt intgtsel intgtjoinsel ));
-DATA(insert OID = 624 ( "<=" PGUID 0 b t f 700 700 16 625 623 0 0 float4le intltsel intltjoinsel ));
-DATA(insert OID = 625 ( ">=" PGUID 0 b t f 700 700 16 624 622 0 0 float4ge intgtsel intgtjoinsel ));
+DATA(insert OID = 622 ( "<" PGUID 0 b t f 700 700 16 623 625 0 0 float4lt scalarltsel scalarltjoinsel ));
+DATA(insert OID = 623 ( ">" PGUID 0 b t f 700 700 16 622 624 0 0 float4gt scalargtsel scalargtjoinsel ));
+DATA(insert OID = 624 ( "<=" PGUID 0 b t f 700 700 16 625 623 0 0 float4le scalarltsel scalarltjoinsel ));
+DATA(insert OID = 625 ( ">=" PGUID 0 b t f 700 700 16 624 622 0 0 float4ge scalargtsel scalargtjoinsel ));
DATA(insert OID = 626 ( "!!=" PGUID 0 b t f 23 19 16 0 0 0 0 int4notin - - ));
DATA(insert OID = 627 ( "!!=" PGUID 0 b t f 26 19 16 0 0 0 0 oidnotin - - ));
DATA(insert OID = 630 ( "<>" PGUID 0 b t f 18 18 16 630 92 0 0 charne neqsel neqjoinsel ));
-DATA(insert OID = 631 ( "<" PGUID 0 b t f 18 18 16 633 634 0 0 charlt intltsel intltjoinsel ));
-DATA(insert OID = 632 ( "<=" PGUID 0 b t f 18 18 16 634 633 0 0 charle intltsel intltjoinsel ));
-DATA(insert OID = 633 ( ">" PGUID 0 b t f 18 18 16 631 632 0 0 chargt intgtsel intgtjoinsel ));
-DATA(insert OID = 634 ( ">=" PGUID 0 b t f 18 18 16 632 631 0 0 charge intgtsel intgtjoinsel ));
+DATA(insert OID = 631 ( "<" PGUID 0 b t f 18 18 16 633 634 0 0 charlt scalarltsel scalarltjoinsel ));
+DATA(insert OID = 632 ( "<=" PGUID 0 b t f 18 18 16 634 633 0 0 charle scalarltsel scalarltjoinsel ));
+DATA(insert OID = 633 ( ">" PGUID 0 b t f 18 18 16 631 632 0 0 chargt scalargtsel scalargtjoinsel ));
+DATA(insert OID = 634 ( ">=" PGUID 0 b t f 18 18 16 632 631 0 0 charge scalargtsel scalargtjoinsel ));
DATA(insert OID = 635 ( "+" PGUID 0 b t f 18 18 18 0 0 0 0 charpl - - ));
DATA(insert OID = 636 ( "-" PGUID 0 b t f 18 18 18 0 0 0 0 charmi - - ));
@@ -325,21 +325,21 @@ DATA(insert OID = 642 ( "!~" PGUID 0 b t f 25 25 16 0 641 0 0 textregexne
DATA(insert OID = 643 ( "<>" PGUID 0 b t f 19 19 16 643 93 0 0 namene neqsel neqjoinsel ));
DATA(insert OID = 654 ( "||" PGUID 0 b t f 25 25 25 0 0 0 0 textcat - - ));
-DATA(insert OID = 660 ( "<" PGUID 0 b t f 19 19 16 662 663 0 0 namelt intltsel intltjoinsel ));
-DATA(insert OID = 661 ( "<=" PGUID 0 b t f 19 19 16 663 662 0 0 namele intltsel intltjoinsel ));
-DATA(insert OID = 662 ( ">" PGUID 0 b t f 19 19 16 660 661 0 0 namegt intgtsel intgtjoinsel ));
-DATA(insert OID = 663 ( ">=" PGUID 0 b t f 19 19 16 661 660 0 0 namege intgtsel intgtjoinsel ));
-DATA(insert OID = 664 ( "<" PGUID 0 b t f 25 25 16 666 667 0 0 text_lt intltsel intltjoinsel ));
-DATA(insert OID = 665 ( "<=" PGUID 0 b t f 25 25 16 667 666 0 0 text_le intltsel intltjoinsel ));
-DATA(insert OID = 666 ( ">" PGUID 0 b t f 25 25 16 664 665 0 0 text_gt intgtsel intgtjoinsel ));
-DATA(insert OID = 667 ( ">=" PGUID 0 b t f 25 25 16 665 664 0 0 text_ge intgtsel intgtjoinsel ));
+DATA(insert OID = 660 ( "<" PGUID 0 b t f 19 19 16 662 663 0 0 namelt scalarltsel scalarltjoinsel ));
+DATA(insert OID = 661 ( "<=" PGUID 0 b t f 19 19 16 663 662 0 0 namele scalarltsel scalarltjoinsel ));
+DATA(insert OID = 662 ( ">" PGUID 0 b t f 19 19 16 660 661 0 0 namegt scalargtsel scalargtjoinsel ));
+DATA(insert OID = 663 ( ">=" PGUID 0 b t f 19 19 16 661 660 0 0 namege scalargtsel scalargtjoinsel ));
+DATA(insert OID = 664 ( "<" PGUID 0 b t f 25 25 16 666 667 0 0 text_lt scalarltsel scalarltjoinsel ));
+DATA(insert OID = 665 ( "<=" PGUID 0 b t f 25 25 16 667 666 0 0 text_le scalarltsel scalarltjoinsel ));
+DATA(insert OID = 666 ( ">" PGUID 0 b t f 25 25 16 664 665 0 0 text_gt scalargtsel scalargtjoinsel ));
+DATA(insert OID = 667 ( ">=" PGUID 0 b t f 25 25 16 665 664 0 0 text_ge scalargtsel scalargtjoinsel ));
DATA(insert OID = 670 ( "=" PGUID 0 b t f 701 701 16 670 671 672 672 float8eq eqsel eqjoinsel ));
DATA(insert OID = 671 ( "<>" PGUID 0 b t f 701 701 16 671 670 0 0 float8ne neqsel neqjoinsel ));
-DATA(insert OID = 672 ( "<" PGUID 0 b t f 701 701 16 674 675 0 0 float8lt intltsel intltjoinsel ));
-DATA(insert OID = 673 ( "<=" PGUID 0 b t f 701 701 16 675 674 0 0 float8le intltsel intltjoinsel ));
-DATA(insert OID = 674 ( ">" PGUID 0 b t f 701 701 16 672 673 0 0 float8gt intgtsel intgtjoinsel ));
-DATA(insert OID = 675 ( ">=" PGUID 0 b t f 701 701 16 673 672 0 0 float8ge intgtsel intgtjoinsel ));
+DATA(insert OID = 672 ( "<" PGUID 0 b t f 701 701 16 674 675 0 0 float8lt scalarltsel scalarltjoinsel ));
+DATA(insert OID = 673 ( "<=" PGUID 0 b t f 701 701 16 675 674 0 0 float8le scalarltsel scalarltjoinsel ));
+DATA(insert OID = 674 ( ">" PGUID 0 b t f 701 701 16 672 673 0 0 float8gt scalargtsel scalargtjoinsel ));
+DATA(insert OID = 675 ( ">=" PGUID 0 b t f 701 701 16 673 672 0 0 float8ge scalargtsel scalargtjoinsel ));
DATA(insert OID = 684 ( "+" PGUID 0 b t f 20 20 20 684 0 0 0 int8pl - - ));
DATA(insert OID = 685 ( "-" PGUID 0 b t f 20 20 20 0 0 0 0 int8mi - - ));
@@ -378,10 +378,10 @@ DATA(insert OID = 759 ( "~" PGUID 0 b t f 718 600 16 758 0 0 0 circle_c
/* additional operators for geometric types - thomas 1997-07-09 */
DATA(insert OID = 792 ( "=" PGUID 0 b t f 602 602 16 792 0 0 0 path_n_eq eqsel eqjoinsel ));
-DATA(insert OID = 793 ( "<" PGUID 0 b t f 602 602 16 794 0 0 0 path_n_lt intltsel intltjoinsel ));
-DATA(insert OID = 794 ( ">" PGUID 0 b t f 602 602 16 793 0 0 0 path_n_gt intgtsel intgtjoinsel ));
-DATA(insert OID = 795 ( "<=" PGUID 0 b t f 602 602 16 796 0 0 0 path_n_le intltsel intltjoinsel ));
-DATA(insert OID = 796 ( ">=" PGUID 0 b t f 602 602 16 795 0 0 0 path_n_ge intgtsel intgtjoinsel ));
+DATA(insert OID = 793 ( "<" PGUID 0 b t f 602 602 16 794 0 0 0 path_n_lt - - ));
+DATA(insert OID = 794 ( ">" PGUID 0 b t f 602 602 16 793 0 0 0 path_n_gt - - ));
+DATA(insert OID = 795 ( "<=" PGUID 0 b t f 602 602 16 796 0 0 0 path_n_le - - ));
+DATA(insert OID = 796 ( ">=" PGUID 0 b t f 602 602 16 795 0 0 0 path_n_ge - - ));
DATA(insert OID = 797 ( "#" PGUID 0 l t f 0 602 23 0 0 0 0 path_npoints - - ));
DATA(insert OID = 798 ( "?#" PGUID 0 b t f 602 602 16 0 0 0 0 path_inter - - ));
DATA(insert OID = 799 ( "@-@" PGUID 0 l t f 0 602 701 0 0 0 0 path_length - - ));
@@ -398,10 +398,10 @@ DATA(insert OID = 809 ( "?|" PGUID 0 b t f 600 600 16 809 0 0 0 point_
DATA(insert OID = 811 ( "=" PGUID 0 b t f 704 704 16 811 812 0 0 intervaleq eqsel eqjoinsel ));
DATA(insert OID = 812 ( "<>" PGUID 0 b t f 704 704 16 812 811 0 0 intervalne neqsel neqjoinsel ));
-DATA(insert OID = 813 ( "<" PGUID 0 b t f 704 704 16 814 816 0 0 intervallt intltsel intltjoinsel ));
-DATA(insert OID = 814 ( ">" PGUID 0 b t f 704 704 16 813 815 0 0 intervalgt intgtsel intgtjoinsel ));
-DATA(insert OID = 815 ( "<=" PGUID 0 b t f 704 704 16 816 814 0 0 intervalle intltsel intltjoinsel ));
-DATA(insert OID = 816 ( ">=" PGUID 0 b t f 704 704 16 815 813 0 0 intervalge intgtsel intgtjoinsel ));
+DATA(insert OID = 813 ( "<" PGUID 0 b t f 704 704 16 814 816 0 0 intervallt scalarltsel scalarltjoinsel ));
+DATA(insert OID = 814 ( ">" PGUID 0 b t f 704 704 16 813 815 0 0 intervalgt scalargtsel scalargtjoinsel ));
+DATA(insert OID = 815 ( "<=" PGUID 0 b t f 704 704 16 816 814 0 0 intervalle scalarltsel scalarltjoinsel ));
+DATA(insert OID = 816 ( ">=" PGUID 0 b t f 704 704 16 815 813 0 0 intervalge scalargtsel scalargtjoinsel ));
DATA(insert OID = 843 ( "*" PGUID 0 b t f 790 700 790 845 0 0 0 cash_mul_flt4 - - ));
DATA(insert OID = 844 ( "/" PGUID 0 b t f 790 700 790 0 0 0 0 cash_div_flt4 - - ));
@@ -409,10 +409,10 @@ DATA(insert OID = 845 ( "*" PGUID 0 b t f 700 790 790 843 0 0 0 flt4
DATA(insert OID = 900 ( "=" PGUID 0 b t t 790 790 16 900 901 902 902 cash_eq eqsel eqjoinsel ));
DATA(insert OID = 901 ( "<>" PGUID 0 b t f 790 790 16 901 900 0 0 cash_ne neqsel neqjoinsel ));
-DATA(insert OID = 902 ( "<" PGUID 0 b t f 790 790 16 903 905 0 0 cash_lt intltsel intltjoinsel ));
-DATA(insert OID = 903 ( ">" PGUID 0 b t f 790 790 16 902 904 0 0 cash_gt intgtsel intgtjoinsel ));
-DATA(insert OID = 904 ( "<=" PGUID 0 b t f 790 790 16 905 903 0 0 cash_le intltsel intltjoinsel ));
-DATA(insert OID = 905 ( ">=" PGUID 0 b t f 790 790 16 904 902 0 0 cash_ge intgtsel intgtjoinsel ));
+DATA(insert OID = 902 ( "<" PGUID 0 b t f 790 790 16 903 905 0 0 cash_lt scalarltsel scalarltjoinsel ));
+DATA(insert OID = 903 ( ">" PGUID 0 b t f 790 790 16 902 904 0 0 cash_gt scalargtsel scalargtjoinsel ));
+DATA(insert OID = 904 ( "<=" PGUID 0 b t f 790 790 16 905 903 0 0 cash_le scalarltsel scalarltjoinsel ));
+DATA(insert OID = 905 ( ">=" PGUID 0 b t f 790 790 16 904 902 0 0 cash_ge scalargtsel scalargtjoinsel ));
DATA(insert OID = 906 ( "+" PGUID 0 b t f 790 790 790 906 0 0 0 cash_pl - - ));
DATA(insert OID = 907 ( "-" PGUID 0 b t f 790 790 790 0 0 0 0 cash_mi - - ));
DATA(insert OID = 908 ( "*" PGUID 0 b t f 790 701 790 916 0 0 0 cash_mul_flt8 - - ));
@@ -443,28 +443,28 @@ DATA(insert OID = 1055 ( "~" PGUID 0 b t f 1042 25 16 0 1056 0 0 textreg
#define OID_BPCHAR_REGEXEQ_OP 1055
DATA(insert OID = 1056 ( "!~" PGUID 0 b t f 1042 25 16 0 1055 0 0 textregexne neqsel neqjoinsel ));
DATA(insert OID = 1057 ( "<>" PGUID 0 b t f 1042 1042 16 1057 1054 0 0 bpcharne neqsel neqjoinsel ));
-DATA(insert OID = 1058 ( "<" PGUID 0 b t f 1042 1042 16 1060 1061 0 0 bpcharlt intltsel intltjoinsel ));
-DATA(insert OID = 1059 ( "<=" PGUID 0 b t f 1042 1042 16 1061 1060 0 0 bpcharle intltsel intltjoinsel ));
-DATA(insert OID = 1060 ( ">" PGUID 0 b t f 1042 1042 16 1058 1059 0 0 bpchargt intgtsel intgtjoinsel ));
-DATA(insert OID = 1061 ( ">=" PGUID 0 b t f 1042 1042 16 1059 1058 0 0 bpcharge intgtsel intgtjoinsel ));
+DATA(insert OID = 1058 ( "<" PGUID 0 b t f 1042 1042 16 1060 1061 0 0 bpcharlt scalarltsel scalarltjoinsel ));
+DATA(insert OID = 1059 ( "<=" PGUID 0 b t f 1042 1042 16 1061 1060 0 0 bpcharle scalarltsel scalarltjoinsel ));
+DATA(insert OID = 1060 ( ">" PGUID 0 b t f 1042 1042 16 1058 1059 0 0 bpchargt scalargtsel scalargtjoinsel ));
+DATA(insert OID = 1061 ( ">=" PGUID 0 b t f 1042 1042 16 1059 1058 0 0 bpcharge scalargtsel scalargtjoinsel ));
DATA(insert OID = 1062 ( "=" PGUID 0 b t t 1043 1043 16 1062 1065 1066 1066 varchareq eqsel eqjoinsel ));
DATA(insert OID = 1063 ( "~" PGUID 0 b t f 1043 25 16 0 1064 0 0 textregexeq eqsel eqjoinsel ));
#define OID_VARCHAR_REGEXEQ_OP 1063
DATA(insert OID = 1064 ( "!~" PGUID 0 b t f 1043 25 16 0 1063 0 0 textregexne neqsel neqjoinsel ));
DATA(insert OID = 1065 ( "<>" PGUID 0 b t f 1043 1043 16 1065 1062 0 0 varcharne neqsel neqjoinsel ));
-DATA(insert OID = 1066 ( "<" PGUID 0 b t f 1043 1043 16 1068 1069 0 0 varcharlt intltsel intltjoinsel ));
-DATA(insert OID = 1067 ( "<=" PGUID 0 b t f 1043 1043 16 1069 1068 0 0 varcharle intltsel intltjoinsel ));
-DATA(insert OID = 1068 ( ">" PGUID 0 b t f 1043 1043 16 1066 1067 0 0 varchargt intgtsel intgtjoinsel ));
-DATA(insert OID = 1069 ( ">=" PGUID 0 b t f 1043 1043 16 1067 1066 0 0 varcharge intgtsel intgtjoinsel ));
+DATA(insert OID = 1066 ( "<" PGUID 0 b t f 1043 1043 16 1068 1069 0 0 varcharlt scalarltsel scalarltjoinsel ));
+DATA(insert OID = 1067 ( "<=" PGUID 0 b t f 1043 1043 16 1069 1068 0 0 varcharle scalarltsel scalarltjoinsel ));
+DATA(insert OID = 1068 ( ">" PGUID 0 b t f 1043 1043 16 1066 1067 0 0 varchargt scalargtsel scalargtjoinsel ));
+DATA(insert OID = 1069 ( ">=" PGUID 0 b t f 1043 1043 16 1067 1066 0 0 varcharge scalargtsel scalargtjoinsel ));
/* date operators */
DATA(insert OID = 1093 ( "=" PGUID 0 b t t 1082 1082 16 1093 1094 1095 1095 date_eq eqsel eqjoinsel ));
DATA(insert OID = 1094 ( "<>" PGUID 0 b t f 1082 1082 16 1094 1093 0 0 date_ne neqsel neqjoinsel ));
-DATA(insert OID = 1095 ( "<" PGUID 0 b t f 1082 1082 16 1097 1098 0 0 date_lt intltsel intltjoinsel ));
-DATA(insert OID = 1096 ( "<=" PGUID 0 b t f 1082 1082 16 1098 1097 0 0 date_le intltsel intltjoinsel ));
-DATA(insert OID = 1097 ( ">" PGUID 0 b t f 1082 1082 16 1095 1096 0 0 date_gt intgtsel intgtjoinsel ));
-DATA(insert OID = 1098 ( ">=" PGUID 0 b t f 1082 1082 16 1096 1095 0 0 date_ge intgtsel intgtjoinsel ));
+DATA(insert OID = 1095 ( "<" PGUID 0 b t f 1082 1082 16 1097 1098 0 0 date_lt scalarltsel scalarltjoinsel ));
+DATA(insert OID = 1096 ( "<=" PGUID 0 b t f 1082 1082 16 1098 1097 0 0 date_le scalarltsel scalarltjoinsel ));
+DATA(insert OID = 1097 ( ">" PGUID 0 b t f 1082 1082 16 1095 1096 0 0 date_gt scalargtsel scalargtjoinsel ));
+DATA(insert OID = 1098 ( ">=" PGUID 0 b t f 1082 1082 16 1096 1095 0 0 date_ge scalargtsel scalargtjoinsel ));
DATA(insert OID = 1099 ( "-" PGUID 0 b t f 1082 1082 23 0 0 0 0 date_mi - - ));
DATA(insert OID = 1100 ( "+" PGUID 0 b t f 1082 23 1082 0 0 0 0 date_pli - - ));
DATA(insert OID = 1101 ( "-" PGUID 0 b t f 1082 23 1082 0 0 0 0 date_mii - - ));
@@ -472,10 +472,10 @@ DATA(insert OID = 1101 ( "-" PGUID 0 b t f 1082 23 1082 0 0 0 0 date_mii -
/* time operators */
DATA(insert OID = 1108 ( "=" PGUID 0 b t f 1083 1083 16 1108 1109 1110 1110 time_eq eqsel eqjoinsel ));
DATA(insert OID = 1109 ( "<>" PGUID 0 b t f 1083 1083 16 1109 1108 0 0 time_ne neqsel neqjoinsel ));
-DATA(insert OID = 1110 ( "<" PGUID 0 b t f 1083 1083 16 1112 1113 0 0 time_lt intltsel intltjoinsel ));
-DATA(insert OID = 1111 ( "<=" PGUID 0 b t f 1083 1083 16 1113 1112 0 0 time_le intltsel intltjoinsel ));
-DATA(insert OID = 1112 ( ">" PGUID 0 b t f 1083 1083 16 1110 1111 0 0 time_gt intgtsel intgtjoinsel ));
-DATA(insert OID = 1113 ( ">=" PGUID 0 b t f 1083 1083 16 1111 1110 0 0 time_ge intgtsel intgtjoinsel ));
+DATA(insert OID = 1110 ( "<" PGUID 0 b t f 1083 1083 16 1112 1113 0 0 time_lt scalarltsel scalarltjoinsel ));
+DATA(insert OID = 1111 ( "<=" PGUID 0 b t f 1083 1083 16 1113 1112 0 0 time_le scalarltsel scalarltjoinsel ));
+DATA(insert OID = 1112 ( ">" PGUID 0 b t f 1083 1083 16 1110 1111 0 0 time_gt scalargtsel scalargtjoinsel ));
+DATA(insert OID = 1113 ( ">=" PGUID 0 b t f 1083 1083 16 1111 1110 0 0 time_ge scalargtsel scalargtjoinsel ));
/* float48 operators */
DATA(insert OID = 1116 ( "+" PGUID 0 b t f 700 701 701 1126 0 0 0 float48pl - - ));
@@ -484,10 +484,10 @@ DATA(insert OID = 1118 ( "/" PGUID 0 b t f 700 701 701 0 0 0 0 float48div
DATA(insert OID = 1119 ( "*" PGUID 0 b t f 700 701 701 1129 0 0 0 float48mul - - ));
DATA(insert OID = 1120 ( "=" PGUID 0 b t f 700 701 16 1130 1121 622 672 float48eq eqsel eqjoinsel ));
DATA(insert OID = 1121 ( "<>" PGUID 0 b t f 700 701 16 1131 1120 0 0 float48ne neqsel neqjoinsel ));
-DATA(insert OID = 1122 ( "<" PGUID 0 b t f 700 701 16 1133 1125 0 0 float48lt intltsel intltjoinsel ));
-DATA(insert OID = 1123 ( ">" PGUID 0 b t f 700 701 16 1132 1124 0 0 float48gt intgtsel intgtjoinsel ));
-DATA(insert OID = 1124 ( "<=" PGUID 0 b t f 700 701 16 1135 1123 0 0 float48le intltsel intltjoinsel ));
-DATA(insert OID = 1125 ( ">=" PGUID 0 b t f 700 701 16 1134 1122 0 0 float48ge intgtsel intgtjoinsel ));
+DATA(insert OID = 1122 ( "<" PGUID 0 b t f 700 701 16 1133 1125 0 0 float48lt scalarltsel scalarltjoinsel ));
+DATA(insert OID = 1123 ( ">" PGUID 0 b t f 700 701 16 1132 1124 0 0 float48gt scalargtsel scalargtjoinsel ));
+DATA(insert OID = 1124 ( "<=" PGUID 0 b t f 700 701 16 1135 1123 0 0 float48le scalarltsel scalarltjoinsel ));
+DATA(insert OID = 1125 ( ">=" PGUID 0 b t f 700 701 16 1134 1122 0 0 float48ge scalargtsel scalargtjoinsel ));
/* float84 operators */
DATA(insert OID = 1126 ( "+" PGUID 0 b t f 701 700 701 1116 0 0 0 float84pl - - ));
@@ -496,10 +496,10 @@ DATA(insert OID = 1128 ( "/" PGUID 0 b t f 701 700 701 0 0 0 0 float84div
DATA(insert OID = 1129 ( "*" PGUID 0 b t f 701 700 701 1119 0 0 0 float84mul - - ));
DATA(insert OID = 1130 ( "=" PGUID 0 b t f 701 700 16 1120 1131 672 622 float84eq eqsel eqjoinsel ));
DATA(insert OID = 1131 ( "<>" PGUID 0 b t f 701 700 16 1121 1130 0 0 float84ne neqsel neqjoinsel ));
-DATA(insert OID = 1132 ( "<" PGUID 0 b t f 701 700 16 1123 1135 0 0 float84lt intltsel intltjoinsel ));
-DATA(insert OID = 1133 ( ">" PGUID 0 b t f 701 700 16 1122 1134 0 0 float84gt intgtsel intgtjoinsel ));
-DATA(insert OID = 1134 ( "<=" PGUID 0 b t f 701 700 16 1125 1133 0 0 float84le intltsel intltjoinsel ));
-DATA(insert OID = 1135 ( ">=" PGUID 0 b t f 701 700 16 1124 1132 0 0 float84ge intgtsel intgtjoinsel ));
+DATA(insert OID = 1132 ( "<" PGUID 0 b t f 701 700 16 1123 1135 0 0 float84lt scalarltsel scalarltjoinsel ));
+DATA(insert OID = 1133 ( ">" PGUID 0 b t f 701 700 16 1122 1134 0 0 float84gt scalargtsel scalargtjoinsel ));
+DATA(insert OID = 1134 ( "<=" PGUID 0 b t f 701 700 16 1125 1133 0 0 float84le scalarltsel scalarltjoinsel ));
+DATA(insert OID = 1135 ( ">=" PGUID 0 b t f 701 700 16 1124 1132 0 0 float84ge scalargtsel scalargtjoinsel ));
/* int4 and oid equality */
DATA(insert OID = 1136 ( "=" PGUID 0 b t t 23 26 16 1137 0 0 0 int4eqoid eqsel eqjoinsel ));
@@ -535,19 +535,19 @@ DATA(insert OID = 1235 ( "!~*" PGUID 0 b t f 1042 25 16 0 1234 0 0 texticreg
DATA(insert OID = 1300 ( "=" PGUID 0 b t t 1296 1296 16 1300 1301 1302 1302 timestampeq eqsel eqjoinsel ));
DATA(insert OID = 1301 ( "<>" PGUID 0 b t f 1296 1296 16 1301 1300 0 0 timestampne neqsel neqjoinsel ));
-DATA(insert OID = 1302 ( "<" PGUID 0 b t f 1296 1296 16 1303 1305 0 0 timestamplt intltsel intltjoinsel ));
-DATA(insert OID = 1303 ( ">" PGUID 0 b t f 1296 1296 16 1302 1304 0 0 timestampgt intgtsel intgtjoinsel ));
-DATA(insert OID = 1304 ( "<=" PGUID 0 b t f 1296 1296 16 1305 1303 0 0 timestample intltsel intltjoinsel ));
-DATA(insert OID = 1305 ( ">=" PGUID 0 b t f 1296 1296 16 1304 1302 0 0 timestampge intgtsel intgtjoinsel ));
+DATA(insert OID = 1302 ( "<" PGUID 0 b t f 1296 1296 16 1303 1305 0 0 timestamplt scalarltsel scalarltjoinsel ));
+DATA(insert OID = 1303 ( ">" PGUID 0 b t f 1296 1296 16 1302 1304 0 0 timestampgt scalargtsel scalargtjoinsel ));
+DATA(insert OID = 1304 ( "<=" PGUID 0 b t f 1296 1296 16 1305 1303 0 0 timestample scalarltsel scalarltjoinsel ));
+DATA(insert OID = 1305 ( ">=" PGUID 0 b t f 1296 1296 16 1304 1302 0 0 timestampge scalargtsel scalargtjoinsel ));
/* datetime operators */
/* name, owner, prec, kind, isleft, canhash, left, right, result, com, negate, lsortop, rsortop, oprcode, operrest, oprjoin */
DATA(insert OID = 1320 ( "=" PGUID 0 b t f 1184 1184 16 1320 1321 1322 1322 datetime_eq eqsel eqjoinsel ));
DATA(insert OID = 1321 ( "<>" PGUID 0 b t f 1184 1184 16 1321 1320 0 0 datetime_ne neqsel neqjoinsel ));
-DATA(insert OID = 1322 ( "<" PGUID 0 b t f 1184 1184 16 1324 1325 0 0 datetime_lt intltsel intltjoinsel ));
-DATA(insert OID = 1323 ( "<=" PGUID 0 b t f 1184 1184 16 1325 1324 0 0 datetime_le intltsel intltjoinsel ));
-DATA(insert OID = 1324 ( ">" PGUID 0 b t f 1184 1184 16 1322 1323 0 0 datetime_gt intgtsel intgtjoinsel ));
-DATA(insert OID = 1325 ( ">=" PGUID 0 b t f 1184 1184 16 1323 1322 0 0 datetime_ge intgtsel intgtjoinsel ));
+DATA(insert OID = 1322 ( "<" PGUID 0 b t f 1184 1184 16 1324 1325 0 0 datetime_lt scalarltsel scalarltjoinsel ));
+DATA(insert OID = 1323 ( "<=" PGUID 0 b t f 1184 1184 16 1325 1324 0 0 datetime_le scalarltsel scalarltjoinsel ));
+DATA(insert OID = 1324 ( ">" PGUID 0 b t f 1184 1184 16 1322 1323 0 0 datetime_gt scalargtsel scalargtjoinsel ));
+DATA(insert OID = 1325 ( ">=" PGUID 0 b t f 1184 1184 16 1323 1322 0 0 datetime_ge scalargtsel scalargtjoinsel ));
DATA(insert OID = 1327 ( "+" PGUID 0 b t f 1184 1186 1184 0 0 0 0 datetime_pl_span - - ));
DATA(insert OID = 1328 ( "-" PGUID 0 b t f 1184 1184 1186 0 0 0 0 datetime_mi - - ));
@@ -556,10 +556,10 @@ DATA(insert OID = 1329 ( "-" PGUID 0 b t f 1184 1186 1184 0 0 0 0 datetim
/* timespan operators */
DATA(insert OID = 1330 ( "=" PGUID 0 b t f 1186 1186 16 1330 1331 1332 1332 timespan_eq eqsel eqjoinsel ));
DATA(insert OID = 1331 ( "<>" PGUID 0 b t f 1186 1186 16 1331 1330 0 0 timespan_ne neqsel neqjoinsel ));
-DATA(insert OID = 1332 ( "<" PGUID 0 b t f 1186 1186 16 1334 1335 0 0 timespan_lt intltsel intltjoinsel ));
-DATA(insert OID = 1333 ( "<=" PGUID 0 b t f 1186 1186 16 1335 1334 0 0 timespan_le intltsel intltjoinsel ));
-DATA(insert OID = 1334 ( ">" PGUID 0 b t f 1186 1186 16 1332 1333 0 0 timespan_gt intgtsel intgtjoinsel ));
-DATA(insert OID = 1335 ( ">=" PGUID 0 b t f 1186 1186 16 1333 1332 0 0 timespan_ge intgtsel intgtjoinsel ));
+DATA(insert OID = 1332 ( "<" PGUID 0 b t f 1186 1186 16 1334 1335 0 0 timespan_lt scalarltsel scalarltjoinsel ));
+DATA(insert OID = 1333 ( "<=" PGUID 0 b t f 1186 1186 16 1335 1334 0 0 timespan_le scalarltsel scalarltjoinsel ));
+DATA(insert OID = 1334 ( ">" PGUID 0 b t f 1186 1186 16 1332 1333 0 0 timespan_gt scalargtsel scalargtjoinsel ));
+DATA(insert OID = 1335 ( ">=" PGUID 0 b t f 1186 1186 16 1333 1332 0 0 timespan_ge scalargtsel scalargtjoinsel ));
DATA(insert OID = 1336 ( "-" PGUID 0 l t f 0 1186 1186 0 0 0 0 timespan_um - - ));
DATA(insert OID = 1337 ( "+" PGUID 0 b t f 1186 1186 1186 1337 0 0 0 timespan_pl - - ));
@@ -626,10 +626,10 @@ DATA(insert OID = 1578 ( "##" PGUID 0 b t f 601 601 600 0 0 0 0 close_l
DATA(insert OID = 1585 ( "/" PGUID 0 b t f 1186 701 1186 0 0 0 0 timespan_div - - ));
DATA(insert OID = 1586 ( "<>" PGUID 0 b t f 601 601 16 1586 1535 0 0 lseg_ne neqsel neqjoinsel ));
-DATA(insert OID = 1587 ( "<" PGUID 0 b t f 601 601 16 1589 1590 0 0 lseg_lt intltsel intltjoinsel ));
-DATA(insert OID = 1588 ( "<=" PGUID 0 b t f 601 601 16 1590 1589 0 0 lseg_le intltsel intltjoinsel ));
-DATA(insert OID = 1589 ( ">" PGUID 0 b t f 601 601 16 1587 1588 0 0 lseg_gt intgtsel intgtjoinsel ));
-DATA(insert OID = 1590 ( ">=" PGUID 0 b t f 601 601 16 1588 1587 0 0 lseg_ge intgtsel intgtjoinsel ));
+DATA(insert OID = 1587 ( "<" PGUID 0 b t f 601 601 16 1589 1590 0 0 lseg_lt - - ));
+DATA(insert OID = 1588 ( "<=" PGUID 0 b t f 601 601 16 1590 1589 0 0 lseg_le - - ));
+DATA(insert OID = 1589 ( ">" PGUID 0 b t f 601 601 16 1587 1588 0 0 lseg_gt - - ));
+DATA(insert OID = 1590 ( ">=" PGUID 0 b t f 601 601 16 1588 1587 0 0 lseg_ge - - ));
DATA(insert OID = 1591 ( "@-@" PGUID 0 l t f 0 601 701 0 0 0 0 lseg_length - - ));
@@ -644,18 +644,18 @@ DATA(insert OID = 1617 ( "#" PGUID 0 b t f 628 628 600 1617 0 0 0 line_in
/* MAC type */
DATA(insert OID = 1220 ( "=" PGUID 0 b t f 829 829 16 1220 1221 0 0 macaddr_eq eqsel eqjoinsel ));
DATA(insert OID = 1221 ( "<>" PGUID 0 b t f 829 829 16 1221 1220 0 0 macaddr_ne neqsel neqjoinsel ));
-DATA(insert OID = 1222 ( "<" PGUID 0 b t f 829 829 16 1224 1225 0 0 macaddr_lt intltsel intltjoinsel ));
-DATA(insert OID = 1223 ( "<=" PGUID 0 b t f 829 829 16 1225 1224 0 0 macaddr_le intltsel intltjoinsel ));
-DATA(insert OID = 1224 ( ">" PGUID 0 b t f 829 829 16 1222 1223 0 0 macaddr_gt intgtsel intgtjoinsel ));
-DATA(insert OID = 1225 ( ">=" PGUID 0 b t f 829 829 16 1223 1222 0 0 macaddr_ge intgtsel intgtjoinsel ));
+DATA(insert OID = 1222 ( "<" PGUID 0 b t f 829 829 16 1224 1225 0 0 macaddr_lt scalarltsel scalarltjoinsel ));
+DATA(insert OID = 1223 ( "<=" PGUID 0 b t f 829 829 16 1225 1224 0 0 macaddr_le scalarltsel scalarltjoinsel ));
+DATA(insert OID = 1224 ( ">" PGUID 0 b t f 829 829 16 1222 1223 0 0 macaddr_gt scalargtsel scalargtjoinsel ));
+DATA(insert OID = 1225 ( ">=" PGUID 0 b t f 829 829 16 1223 1222 0 0 macaddr_ge scalargtsel scalargtjoinsel ));
/* INET type */
DATA(insert OID = 1201 ( "=" PGUID 0 b t f 869 869 16 1201 1202 0 0 network_eq eqsel eqjoinsel ));
DATA(insert OID = 1202 ( "<>" PGUID 0 b t f 869 869 16 1202 1201 0 0 network_ne neqsel neqjoinsel ));
-DATA(insert OID = 1203 ( "<" PGUID 0 b t f 869 869 16 1205 1206 0 0 network_lt intltsel intltjoinsel ));
-DATA(insert OID = 1204 ( "<=" PGUID 0 b t f 869 869 16 1206 1205 0 0 network_le intltsel intltjoinsel ));
-DATA(insert OID = 1205 ( ">" PGUID 0 b t f 869 869 16 1203 1204 0 0 network_gt intgtsel intgtjoinsel ));
-DATA(insert OID = 1206 ( ">=" PGUID 0 b t f 869 869 16 1204 1203 0 0 network_ge intgtsel intgtjoinsel ));
+DATA(insert OID = 1203 ( "<" PGUID 0 b t f 869 869 16 1205 1206 0 0 network_lt scalarltsel scalarltjoinsel ));
+DATA(insert OID = 1204 ( "<=" PGUID 0 b t f 869 869 16 1206 1205 0 0 network_le scalarltsel scalarltjoinsel ));
+DATA(insert OID = 1205 ( ">" PGUID 0 b t f 869 869 16 1203 1204 0 0 network_gt scalargtsel scalargtjoinsel ));
+DATA(insert OID = 1206 ( ">=" PGUID 0 b t f 869 869 16 1204 1203 0 0 network_ge scalargtsel scalargtjoinsel ));
DATA(insert OID = 931 ( "<<" PGUID 0 b t f 869 869 16 933 934 0 0 network_sub - - ));
DATA(insert OID = 932 ( "<<=" PGUID 0 b t f 869 869 16 934 933 0 0 network_subeq - - ));
DATA(insert OID = 933 ( ">>" PGUID 0 b t f 869 869 16 931 932 0 0 network_sup - - ));
@@ -664,10 +664,10 @@ DATA(insert OID = 934 ( ">>=" PGUID 0 b t f 869 869 16 932 931 0 0 netwo
/* CIDR type */
DATA(insert OID = 820 ( "=" PGUID 0 b t f 650 650 16 820 821 0 0 network_eq eqsel eqjoinsel ));
DATA(insert OID = 821 ( "<>" PGUID 0 b t f 650 650 16 821 820 0 0 network_ne neqsel neqjoinsel ));
-DATA(insert OID = 822 ( "<" PGUID 0 b t f 650 650 16 824 825 0 0 network_lt intltsel intltjoinsel ));
-DATA(insert OID = 823 ( "<=" PGUID 0 b t f 650 650 16 825 824 0 0 network_le intltsel intltjoinsel ));
-DATA(insert OID = 824 ( ">" PGUID 0 b t f 650 650 16 822 823 0 0 network_gt intgtsel intgtjoinsel ));
-DATA(insert OID = 825 ( ">=" PGUID 0 b t f 650 650 16 823 822 0 0 network_ge intgtsel intgtjoinsel ));
+DATA(insert OID = 822 ( "<" PGUID 0 b t f 650 650 16 824 825 0 0 network_lt scalarltsel scalarltjoinsel ));
+DATA(insert OID = 823 ( "<=" PGUID 0 b t f 650 650 16 825 824 0 0 network_le scalarltsel scalarltjoinsel ));
+DATA(insert OID = 824 ( ">" PGUID 0 b t f 650 650 16 822 823 0 0 network_gt scalargtsel scalargtjoinsel ));
+DATA(insert OID = 825 ( ">=" PGUID 0 b t f 650 650 16 823 822 0 0 network_ge scalargtsel scalargtjoinsel ));
DATA(insert OID = 826 ( "<<" PGUID 0 b t f 650 650 16 828 1004 0 0 network_sub - - ));
DATA(insert OID = 827 ( "<<=" PGUID 0 b t f 650 650 16 1004 828 0 0 network_subeq - - ));
DATA(insert OID = 828 ( ">>" PGUID 0 b t f 650 650 16 826 827 0 0 network_sup - - ));
@@ -676,10 +676,10 @@ DATA(insert OID = 1004 ( ">>=" PGUID 0 b t f 650 650 16 827 826 0 0 networ
/* NUMERIC type - OID's 1700-1799 */
DATA(insert OID = 1752 ( "=" PGUID 0 b t f 1700 1700 16 1752 1753 1754 1754 numeric_eq eqsel eqjoinsel ));
DATA(insert OID = 1753 ( "<>" PGUID 0 b t f 1700 1700 16 1753 1752 0 0 numeric_ne neqsel neqjoinsel ));
-DATA(insert OID = 1754 ( "<" PGUID 0 b t f 1700 1700 16 1756 1757 0 0 numeric_lt intltsel intltjoinsel ));
-DATA(insert OID = 1755 ( "<=" PGUID 0 b t f 1700 1700 16 1757 1756 0 0 numeric_le intltsel intltjoinsel ));
-DATA(insert OID = 1756 ( ">" PGUID 0 b t f 1700 1700 16 1754 1755 0 0 numeric_gt intgtsel intgtjoinsel ));
-DATA(insert OID = 1757 ( ">=" PGUID 0 b t f 1700 1700 16 1755 1754 0 0 numeric_ge intgtsel intgtjoinsel ));
+DATA(insert OID = 1754 ( "<" PGUID 0 b t f 1700 1700 16 1756 1757 0 0 numeric_lt scalarltsel scalarltjoinsel ));
+DATA(insert OID = 1755 ( "<=" PGUID 0 b t f 1700 1700 16 1757 1756 0 0 numeric_le scalarltsel scalarltjoinsel ));
+DATA(insert OID = 1756 ( ">" PGUID 0 b t f 1700 1700 16 1754 1755 0 0 numeric_gt scalargtsel scalargtjoinsel ));
+DATA(insert OID = 1757 ( ">=" PGUID 0 b t f 1700 1700 16 1755 1754 0 0 numeric_ge scalargtsel scalargtjoinsel ));
DATA(insert OID = 1758 ( "+" PGUID 0 b t f 1700 1700 1700 1758 0 0 0 numeric_add - - ));
DATA(insert OID = 1759 ( "-" PGUID 0 b t f 1700 1700 1700 0 0 0 0 numeric_sub - - ));
DATA(insert OID = 1760 ( "*" PGUID 0 b t f 1700 1700 1700 1760 0 0 0 numeric_mul - - ));
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h
index 0fffcf3657..d731d939c5 100644
--- a/src/include/catalog/pg_proc.h
+++ b/src/include/catalog/pg_proc.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_proc.h,v 1.115 2000/01/22 23:50:23 tgl Exp $
+ * $Id: pg_proc.h,v 1.116 2000/01/24 07:16:52 tgl Exp $
*
* NOTES
* The script catalog/genbki.sh reads this file and generates .bki
@@ -219,21 +219,21 @@ DESCR("btree cost estimator");
/* OIDS 100 - 199 */
DATA(insert OID = 1272 ( eqsel PGUID 11 f t f 5 f 701 "26 26 21 0 23" 100 0 0 100 eqsel - ));
-DESCR("general selectivity");
+DESCR("restriction selectivity of = and related operators");
DATA(insert OID = 102 ( neqsel PGUID 11 f t f 5 f 701 "26 26 21 0 23" 100 0 0 100 neqsel - ));
-DESCR("not-equal selectivity");
-DATA(insert OID = 103 ( intltsel PGUID 11 f t f 5 f 701 "26 26 21 0 23" 100 0 0 100 intltsel - ));
-DESCR("selectivity");
-DATA(insert OID = 104 ( intgtsel PGUID 11 f t f 5 f 701 "26 26 21 0 23" 100 0 0 100 intgtsel - ));
-DESCR("selectivity");
+DESCR("restriction selectivity of <> and related operators");
+DATA(insert OID = 103 ( scalarltsel PGUID 11 f t f 5 f 701 "26 26 21 0 23" 100 0 0 100 scalarltsel - ));
+DESCR("restriction selectivity of < and related operators on scalar datatypes");
+DATA(insert OID = 104 ( scalargtsel PGUID 11 f t f 5 f 701 "26 26 21 0 23" 100 0 0 100 scalargtsel - ));
+DESCR("restriction selectivity of > and related operators on scalar datatypes");
DATA(insert OID = 105 ( eqjoinsel PGUID 11 f t f 5 f 701 "26 26 21 26 21" 100 0 0 100 eqjoinsel - ));
-DESCR("selectivity");
+DESCR("join selectivity of = and related operators");
DATA(insert OID = 106 ( neqjoinsel PGUID 11 f t f 5 f 701 "26 26 21 26 21" 100 0 0 100 neqjoinsel - ));
-DESCR("selectivity");
-DATA(insert OID = 107 ( intltjoinsel PGUID 11 f t f 5 f 701 "26 26 21 26 21" 100 0 0 100 intltjoinsel - ));
-DESCR("selectivity");
-DATA(insert OID = 108 ( intgtjoinsel PGUID 11 f t f 5 f 701 "26 26 21 26 21" 100 0 0 100 intgtjoinsel - ));
-DESCR("selectivity");
+DESCR("join selectivity of <> and related operators");
+DATA(insert OID = 107 ( scalarltjoinsel PGUID 11 f t f 5 f 701 "26 26 21 26 21" 100 0 0 100 scalarltjoinsel - ));
+DESCR("join selectivity of < and related operators on scalar datatypes");
+DATA(insert OID = 108 ( scalargtjoinsel PGUID 11 f t f 5 f 701 "26 26 21 26 21" 100 0 0 100 scalargtjoinsel - ));
+DESCR("join selectivity of > and related operators on scalar datatypes");
DATA(insert OID = 112 ( int4_text PGUID 11 f t t 1 f 25 "23" 100 0 0 100 int4_text - ));
DESCR("convert int4 to text");
@@ -292,9 +292,9 @@ DESCR("contained in");
DATA(insert OID = 138 ( box_center PGUID 11 f t t 1 f 600 "603" 100 1 0 100 box_center - ));
DESCR("center of");
DATA(insert OID = 139 ( areasel PGUID 11 f t f 5 f 701 "26 26 21 0 23" 100 0 0 100 areasel - ));
-DESCR("selectivity");
+DESCR("restriction selectivity for operators on areas");
DATA(insert OID = 140 ( areajoinsel PGUID 11 f t f 5 f 701 "26 26 21 26 21" 100 0 0 100 areajoinsel - ));
-DESCR("selectivity");
+DESCR("join selectivity for operators on areas");
DATA(insert OID = 141 ( int4mul PGUID 11 f t t 2 f 23 "23 23" 100 0 0 100 int4mul - ));
DESCR("multiply");
DATA(insert OID = 142 ( int4fac PGUID 11 f t t 1 f 23 "23" 100 0 0 100 int4fac - ));
diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h
index ae6e3daf62..27289d39b7 100644
--- a/src/include/utils/builtins.h
+++ b/src/include/utils/builtins.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: builtins.h,v 1.97 2000/01/22 23:50:27 tgl Exp $
+ * $Id: builtins.h,v 1.98 2000/01/24 07:16:47 tgl Exp $
*
* NOTES
* This should normally only be included by fmgr.h.
@@ -389,12 +389,13 @@ extern char *deparse_expression(Node *expr, List *rangetables,
/* selfuncs.c */
extern float64 eqsel(Oid opid, Oid relid, AttrNumber attno, Datum value, int32 flag);
extern float64 neqsel(Oid opid, Oid relid, AttrNumber attno, Datum value, int32 flag);
-extern float64 intltsel(Oid opid, Oid relid, AttrNumber attno, Datum value, int32 flag);
-extern float64 intgtsel(Oid opid, Oid relid, AttrNumber attno, Datum value, int32 flag);
+extern float64 scalarltsel(Oid opid, Oid relid, AttrNumber attno, Datum value, int32 flag);
+extern float64 scalargtsel(Oid opid, Oid relid, AttrNumber attno, Datum value, int32 flag);
extern float64 eqjoinsel(Oid opid, Oid relid1, AttrNumber attno1, Oid relid2, AttrNumber attno2);
extern float64 neqjoinsel(Oid opid, Oid relid1, AttrNumber attno1, Oid relid2, AttrNumber attno2);
-extern float64 intltjoinsel(Oid opid, Oid relid1, AttrNumber attno1, Oid relid2, AttrNumber attno2);
-extern float64 intgtjoinsel(Oid opid, Oid relid1, AttrNumber attno1, Oid relid2, AttrNumber attno2);
+extern float64 scalarltjoinsel(Oid opid, Oid relid1, AttrNumber attno1, Oid relid2, AttrNumber attno2);
+extern float64 scalargtjoinsel(Oid opid, Oid relid1, AttrNumber attno1, Oid relid2, AttrNumber attno2);
+extern bool convert_to_scalar(Datum value, Oid typid, double *scaleval);
extern void btcostestimate(Query *root, RelOptInfo *rel,
IndexOptInfo *index, List *indexQuals,
diff --git a/src/tutorial/complex.source b/src/tutorial/complex.source
index 847ec1a218..bc71e34c9e 100644
--- a/src/tutorial/complex.source
+++ b/src/tutorial/complex.source
@@ -7,7 +7,7 @@
--
-- Copyright (c) 1994, Regents of the University of California
--
--- $Id: complex.source,v 1.5 2000/01/22 23:50:30 tgl Exp $
+-- $Id: complex.source,v 1.6 2000/01/24 07:16:48 tgl Exp $
--
---------------------------------------------------------------------------
@@ -148,15 +148,13 @@ CREATE FUNCTION complex_abs_ge(complex, complex) RETURNS bool
CREATE FUNCTION complex_abs_gt(complex, complex) RETURNS bool
AS '_OBJWD_/complex.so' LANGUAGE 'c';
--- the restrict and join selectivity functions are bogus (notice we only
--- have intltsel, eqsel and intgtsel)
CREATE OPERATOR < (
leftarg = complex, rightarg = complex, procedure = complex_abs_lt,
- restrict = intltsel, join = intltjoinsel
+ restrict = scalarltsel, join = scalarltjoinsel
);
CREATE OPERATOR <= (
leftarg = complex, rightarg = complex, procedure = complex_abs_le,
- restrict = intltsel, join = intltjoinsel
+ restrict = scalarltsel, join = scalarltjoinsel
);
CREATE OPERATOR = (
leftarg = complex, rightarg = complex, procedure = complex_abs_eq,
@@ -164,11 +162,11 @@ CREATE OPERATOR = (
);
CREATE OPERATOR >= (
leftarg = complex, rightarg = complex, procedure = complex_abs_ge,
- restrict = intgtsel, join = intgtjoinsel
+ restrict = scalargtsel, join = scalargtjoinsel
);
CREATE OPERATOR > (
leftarg = complex, rightarg = complex, procedure = complex_abs_gt,
- restrict = intgtsel, join = intgtjoinsel
+ restrict = scalargtsel, join = scalargtjoinsel
);
INSERT INTO pg_opclass VALUES ('complex_abs_ops');