diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index 03809d69e42..66fedbce361 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -1,6 +1,6 @@ @@ -1482,6 +1482,15 @@ Name of the operator + + oprnamespace + oid + pg_namespace.oid + + The OID of the namespace that contains this operator + + + oprowner int4 @@ -1493,7 +1502,8 @@ oprprec int2 - unused + precedence (currently unused, as precedences are hard-wired + in the grammar) @@ -1510,7 +1520,8 @@ oprisleft bool - unused + left-associativity (currently unused, as this is hard-wired + in the grammar) @@ -1561,7 +1572,7 @@ pg_operator.oid If this operator supports merge joins, the operator that sorts - the type of the left-hand operand + the type of the left-hand operand (L<L) @@ -1571,28 +1582,48 @@ pg_operator.oid If this operator supports merge joins, the operator that sorts - the type of the right-hand operand + the type of the right-hand operand (R<R) + + + + + oprltcmpop + oid + pg_operator.oid + + If this operator supports merge joins, the less-than operator that + compares the left and right operand types (L<R) + + + + + oprgtcmpop + oid + pg_operator.oid + + If this operator supports merge joins, the greater-than operator that + compares the left and right operand types (L>R) oprcode regproc - + pg_proc.oid Function that implements this operator oprrest regproc - + pg_proc.oid Restriction selectivity estimation function for this operator oprjoin regproc - + pg_proc.oid Join selectivity estimation function for this operator @@ -2498,28 +2529,28 @@ typinput regproc - + pg_proc.oid Input function typoutput regproc - + pg_proc.oid Output function typreceive regproc - + pg_proc.oid unused typsend regproc - + pg_proc.oid unused diff --git a/doc/src/sgml/ref/create_operator.sgml b/doc/src/sgml/ref/create_operator.sgml index e3b41ec5dac..bbe378594e1 100644 --- a/doc/src/sgml/ref/create_operator.sgml +++ b/doc/src/sgml/ref/create_operator.sgml @@ -1,5 +1,5 @@ @@ -28,7 +28,9 @@ CREATE OPERATOR name ( PROCEDURE = righttype ] [, COMMUTATOR = com_op ] [, NEGATOR = neg_op ] [, RESTRICT = res_proc ] [, JOIN = join_proc ] - [, HASHES ] [, SORT1 = left_sort_op ] [, SORT2 = right_sort_op ] ) + [, HASHES ] [, MERGES ] + [, SORT1 = left_sort_op ] [, SORT2 = right_sort_op ] + [, LTCMP = less_than_op ] [, GTCMP = greater_than_op ] ) @@ -115,11 +117,19 @@ CREATE OPERATOR name ( PROCEDURE = + + MERGES + + + Indicates this operator can support a merge join. + + + left_sort_op - If this operator can support a merge join, the + If this operator can support a merge join, the less-than operator that sorts the left-hand data type of this operator. @@ -128,11 +138,29 @@ CREATE OPERATOR name ( PROCEDURE = right_sort_op - If this operator can support a merge join, the + If this operator can support a merge join, the less-than operator that sorts the right-hand data type of this operator. + + less_than_op + + + If this operator can support a merge join, the less-than + operator that compares the input data types of this operator. + + + + + greater_than_op + + + If this operator can support a merge join, the greater-than + operator that compares the input data types of this operator. + + + @@ -295,30 +323,39 @@ MYBOXES.description !== box '((0,0), (1,1))' it also works to just have both operators refer to each other.) - The HASHES, SORT1, and SORT2 options are present to support the - query optimizer in performing joins. - PostgreSQL can always - evaluate a join (i.e., processing a clause with two tuple - variables separated by an operator that returns a boolean) - by iterative substitution [WONG76]. - In addition, PostgreSQL - can use a hash-join algorithm along - the lines of [SHAP86]; however, it must know whether this - strategy is applicable. The current hash-join algorithm - is only correct for operators that represent equality tests; - furthermore, equality of the data type must mean bitwise equality - of the representation of the type. (For example, a data type that - contains unused bits that don't matter for equality tests could - not be hash-joined.) - The HASHES flag indicates to the query optimizer that a hash join - may safely be used with this operator. + The HASHES, MERGES, SORT1, SORT2, LTCMP, and GTCMP options are present to + support the query optimizer in performing joins. + PostgreSQL can always evaluate a join (i.e., + processing a clause with two tuple variables separated by an operator that + returns a boolean) by iterative substitution [WONG76]. In + addition, PostgreSQL can use a hash-join + algorithm along the lines of [SHAP86]; however, it must know whether this + strategy is applicable. The current hash-join algorithm is only correct + for operators that represent equality tests; furthermore, equality of the + data type must mean bitwise equality of the representation of the type. + (For example, a data type that contains unused bits that don't matter for + equality tests could not be hash-joined.) The HASHES flag indicates to the + query optimizer that a hash join may safely be used with this + operator. + - Similarly, the two sort operators indicate to the query - optimizer whether merge-sort is a usable join strategy and - which operators should be used to sort the two operand - classes. Sort operators should only be provided for an equality - operator, and they should refer to less-than operators for the - left and right side data types respectively. + Similarly, the MERGES flag indicates whether merge-sort is a usable join + strategy for this operator. A merge join requires that the two input + datatypes have consistent orderings, and that the mergejoin operator + behave like equality with respect to that ordering. For example, it is + possible to merge-join equality between an integer and a float variable by + sorting both inputs in ordinary + numeric order. Execution of a merge join requires that the system be + able to identify four operators related to the mergejoin equality operator: + less-than comparison for the left input datatype, + less-than comparison for the right input datatype, + less-than comparison between the two datatypes, and + greater-than comparison between the two datatypes. It is possible to + specify these by name, as the SORT1, SORT2, LTCMP, and GTCMP options + respectively. The system will fill in the default names <, + <, <, > respectively if + any of these are omitted when MERGES is specified. Also, MERGES will + be assumed to be implied if any of these four operator options appear. If other join strategies are found to be practical, @@ -408,8 +445,10 @@ CREATE OPERATOR === ( RESTRICT = area_restriction_procedure, JOIN = area_join_procedure, HASHES, - SORT1 = <<<, - SORT2 = <<< + SORT1 = <<<, + SORT2 = <<< + -- Since sort operators were given, MERGES is implied. + -- LTCMP and GTCMP are assumed to be < and > respectively ); diff --git a/src/backend/catalog/indexing.c b/src/backend/catalog/indexing.c index f0c7ef5a0d0..7bfede27b5c 100644 --- a/src/backend/catalog/indexing.c +++ b/src/backend/catalog/indexing.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.88 2002/04/11 19:59:57 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.89 2002/04/16 23:08:10 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -62,7 +62,7 @@ char *Name_pg_namespace_indices[Num_pg_namespace_indices] = char *Name_pg_opclass_indices[Num_pg_opclass_indices] = {OpclassAmNameIndex, OpclassOidIndex}; char *Name_pg_operator_indices[Num_pg_operator_indices] = -{OperatorOidIndex, OperatorNameIndex}; +{OperatorOidIndex, OperatorNameNspIndex}; char *Name_pg_proc_indices[Num_pg_proc_indices] = {ProcedureOidIndex, ProcedureNameNspIndex}; char *Name_pg_relcheck_indices[Num_pg_relcheck_indices] = diff --git a/src/backend/catalog/namespace.c b/src/backend/catalog/namespace.c index 77b6ceb78db..15fdb01ed31 100644 --- a/src/backend/catalog/namespace.c +++ b/src/backend/catalog/namespace.c @@ -13,7 +13,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/namespace.c,v 1.9 2002/04/15 22:33:21 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/namespace.c,v 1.10 2002/04/16 23:08:10 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -27,6 +27,7 @@ #include "catalog/namespace.h" #include "catalog/pg_inherits.h" #include "catalog/pg_namespace.h" +#include "catalog/pg_operator.h" #include "catalog/pg_proc.h" #include "catalog/pg_shadow.h" #include "lib/stringinfo.h" @@ -478,6 +479,179 @@ FuncnameGetCandidates(List *names, int nargs) return resultList; } +/* + * OpernameGetCandidates + * Given a possibly-qualified operator name and operator kind, + * retrieve a list of the possible matches. + * + * We search a single namespace if the operator name is qualified, else + * all namespaces in the search path. The return list will never contain + * multiple entries with identical argument types --- in the multiple- + * namespace case, we arrange for entries in earlier namespaces to mask + * identical entries in later namespaces. + * + * The returned items always have two args[] entries --- one or the other + * will be InvalidOid for a prefix or postfix oprkind. + */ +FuncCandidateList +OpernameGetCandidates(List *names, char oprkind) +{ + FuncCandidateList resultList = NULL; + char *catalogname; + char *schemaname = NULL; + char *opername = NULL; + Oid namespaceId; + CatCList *catlist; + int i; + + /* deconstruct the name list */ + switch (length(names)) + { + case 1: + opername = strVal(lfirst(names)); + break; + case 2: + schemaname = strVal(lfirst(names)); + opername = strVal(lsecond(names)); + break; + case 3: + catalogname = strVal(lfirst(names)); + schemaname = strVal(lsecond(names)); + opername = strVal(lfirst(lnext(lnext(names)))); + /* + * We check the catalog name and then ignore it. + */ + if (strcmp(catalogname, DatabaseName) != 0) + elog(ERROR, "Cross-database references are not implemented"); + break; + default: + elog(ERROR, "Improper qualified name (too many dotted names)"); + break; + } + + if (schemaname) + { + /* use exact schema given */ + namespaceId = GetSysCacheOid(NAMESPACENAME, + CStringGetDatum(schemaname), + 0, 0, 0); + if (!OidIsValid(namespaceId)) + elog(ERROR, "Namespace \"%s\" does not exist", + schemaname); + } + else + { + /* flag to indicate we need namespace search */ + namespaceId = InvalidOid; + } + + /* Search syscache by name only */ + catlist = SearchSysCacheList(OPERNAMENSP, 1, + CStringGetDatum(opername), + 0, 0, 0); + + for (i = 0; i < catlist->n_members; i++) + { + HeapTuple opertup = &catlist->members[i]->tuple; + Form_pg_operator operform = (Form_pg_operator) GETSTRUCT(opertup); + int pathpos = 0; + FuncCandidateList newResult; + + /* Ignore operators of wrong kind */ + if (operform->oprkind != oprkind) + continue; + + if (OidIsValid(namespaceId)) + { + /* Consider only opers in specified namespace */ + if (operform->oprnamespace != namespaceId) + continue; + /* No need to check args, they must all be different */ + } + else + { + /* Consider only opers that are in the search path */ + if (pathContainsSystemNamespace || + !IsSystemNamespace(operform->oprnamespace)) + { + List *nsp; + + foreach(nsp, namespaceSearchPath) + { + pathpos++; + if (operform->oprnamespace == (Oid) lfirsti(nsp)) + break; + } + if (nsp == NIL) + continue; /* oper is not in search path */ + } + + /* + * Okay, it's in the search path, but does it have the same + * arguments as something we already accepted? If so, keep + * only the one that appears earlier in the search path. + * + * If we have an ordered list from SearchSysCacheList (the + * normal case), then any conflicting oper must immediately + * adjoin this one in the list, so we only need to look at + * the newest result item. If we have an unordered list, + * we have to scan the whole result list. + */ + if (resultList) + { + FuncCandidateList prevResult; + + if (catlist->ordered) + { + if (operform->oprleft == resultList->args[0] && + operform->oprright == resultList->args[1]) + prevResult = resultList; + else + prevResult = NULL; + } + else + { + for (prevResult = resultList; + prevResult; + prevResult = prevResult->next) + { + if (operform->oprleft == prevResult->args[0] && + operform->oprright == prevResult->args[1]) + break; + } + } + if (prevResult) + { + /* We have a match with a previous result */ + Assert(pathpos != prevResult->pathpos); + if (pathpos > prevResult->pathpos) + continue; /* keep previous result */ + /* replace previous result */ + prevResult->pathpos = pathpos; + prevResult->oid = opertup->t_data->t_oid; + continue; /* args are same, of course */ + } + } + } + + /* + * Okay to add it to result list + */ + newResult = (FuncCandidateList) + palloc(sizeof(struct _FuncCandidateList) + sizeof(Oid)); + newResult->pathpos = pathpos; + newResult->oid = opertup->t_data->t_oid; + newResult->args[0] = operform->oprleft; + newResult->args[1] = operform->oprright; + newResult->next = resultList; + resultList = newResult; + } + + ReleaseSysCacheList(catlist); + + return resultList; +} + /* * QualifiedNameGetCreationNamespace * Given a possibly-qualified name for an object (in List-of-Values diff --git a/src/backend/catalog/pg_operator.c b/src/backend/catalog/pg_operator.c index 41023b7edc8..3a4bb1bba34 100644 --- a/src/backend/catalog/pg_operator.c +++ b/src/backend/catalog/pg_operator.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.65 2002/04/09 20:35:47 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.66 2002/04/16 23:08:10 tgl Exp $ * * NOTES * these routines moved here from commands/define.c and somewhat cleaned up. @@ -20,42 +20,41 @@ #include "access/heapam.h" #include "catalog/catname.h" #include "catalog/indexing.h" +#include "catalog/namespace.h" #include "catalog/pg_operator.h" -#include "catalog/pg_proc.h" #include "catalog/pg_type.h" #include "miscadmin.h" #include "parser/parse_func.h" +#include "parser/parse_oper.h" #include "utils/builtins.h" -#include "utils/fmgroids.h" #include "utils/lsyscache.h" #include "utils/syscache.h" static Oid OperatorGet(const char *operatorName, + Oid operatorNamespace, Oid leftObjectId, Oid rightObjectId, bool *defined); +static Oid OperatorLookup(List *operatorName, + Oid leftObjectId, + Oid rightObjectId, + bool *defined); + static Oid OperatorShellMake(const char *operatorName, + Oid operatorNamespace, Oid leftTypeId, Oid rightTypeId); -static void OperatorDef(const char *operatorName, - Oid leftTypeId, - Oid rightTypeId, - List *procedureName, - uint16 precedence, - bool isLeftAssociative, - const char *commutatorName, - const char *negatorName, - List *restrictionName, - List *joinName, - bool canHash, - const char *leftSortName, - const char *rightSortName); - static void OperatorUpd(Oid baseId, Oid commId, Oid negId); +static Oid get_other_operator(List *otherOp, + Oid otherLeftTypeId, Oid otherRightTypeId, + const char *operatorName, Oid operatorNamespace, + Oid leftTypeId, Oid rightTypeId, + bool isCommutator); + /* * Check whether a proposed operator name is legal @@ -114,76 +113,36 @@ validOperatorName(const char *name) } -/* ---------------------------------------------------------------- - * OperatorGet +/* + * OperatorGet * - * finds the operator associated with the specified name - * and left and right type IDs. + * finds an operator given an exact specification (name, namespace, + * left and right type IDs). * - * operatorName -- name of operator to fetch - * leftObjectId -- left data type oid of operator to fetch - * rightObjectId -- right data type oid of operator to fetch - * defined -- set TRUE if defined (not a shell) - * ---------------------------------------------------------------- + * *defined is set TRUE if defined (not a shell) */ static Oid OperatorGet(const char *operatorName, + Oid operatorNamespace, Oid leftObjectId, Oid rightObjectId, bool *defined) { - Relation pg_operator_desc; - HeapScanDesc pg_operator_scan; HeapTuple tup; - ScanKeyData opKey[3]; Oid operatorObjectId; - if (!(OidIsValid(leftObjectId) || OidIsValid(rightObjectId))) - elog(ERROR, "operator %s must have at least one operand type", - operatorName); - - /* - * open the pg_operator relation - */ - pg_operator_desc = heap_openr(OperatorRelationName, AccessShareLock); - - /* - * form scan key - */ - ScanKeyEntryInitialize(&opKey[0], 0x0, - Anum_pg_operator_oprname, - F_NAMEEQ, - PointerGetDatum(operatorName)); - ScanKeyEntryInitialize(&opKey[1], 0x0, - Anum_pg_operator_oprleft, - F_OIDEQ, - ObjectIdGetDatum(leftObjectId)); - ScanKeyEntryInitialize(&opKey[2], 0x0, - Anum_pg_operator_oprright, - F_OIDEQ, - ObjectIdGetDatum(rightObjectId)); - - /* - * begin the scan - */ - pg_operator_scan = heap_beginscan(pg_operator_desc, - 0, - SnapshotSelf, /* no cache? */ - 3, - opKey); - - /* - * fetch the operator tuple, if it exists, and determine the proper - * return oid value. - */ - tup = heap_getnext(pg_operator_scan, 0); - + tup = SearchSysCache(OPERNAMENSP, + PointerGetDatum(operatorName), + ObjectIdGetDatum(leftObjectId), + ObjectIdGetDatum(rightObjectId), + ObjectIdGetDatum(operatorNamespace)); if (HeapTupleIsValid(tup)) { regproc oprcode = ((Form_pg_operator) GETSTRUCT(tup))->oprcode; operatorObjectId = tup->t_data->t_oid; *defined = RegProcedureIsValid(oprcode); + ReleaseSysCache(tup); } else { @@ -191,21 +150,48 @@ OperatorGet(const char *operatorName, *defined = false; } - /* - * close the scan and return the oid. - */ - heap_endscan(pg_operator_scan); - heap_close(pg_operator_desc, AccessShareLock); + return operatorObjectId; +} + +/* + * OperatorLookup + * + * looks up an operator given a possibly-qualified name and + * left and right type IDs. + * + * *defined is set TRUE if defined (not a shell) + */ +static Oid +OperatorLookup(List *operatorName, + Oid leftObjectId, + Oid rightObjectId, + bool *defined) +{ + Oid operatorObjectId; + regproc oprcode; + + operatorObjectId = LookupOperName(operatorName, leftObjectId, + rightObjectId); + if (!OidIsValid(operatorObjectId)) + { + *defined = false; + return InvalidOid; + } + + oprcode = get_opcode(operatorObjectId); + *defined = RegProcedureIsValid(oprcode); return operatorObjectId; } + /* * OperatorShellMake * Make a "shell" entry for a not-yet-existing operator. */ static Oid OperatorShellMake(const char *operatorName, + Oid operatorNamespace, Oid leftTypeId, Oid rightTypeId) { @@ -224,11 +210,6 @@ OperatorShellMake(const char *operatorName, if (!validOperatorName(operatorName)) elog(ERROR, "\"%s\" is not a valid operator name", operatorName); - /* - * open pg_operator - */ - pg_operator_desc = heap_openr(OperatorRelationName, RowExclusiveLock); - /* * initialize our *nulls and *values arrays */ @@ -244,28 +225,35 @@ OperatorShellMake(const char *operatorName, */ i = 0; namestrcpy(&oname, operatorName); - values[i++] = NameGetDatum(&oname); - values[i++] = Int32GetDatum(GetUserId()); - values[i++] = UInt16GetDatum(0); - values[i++] = CharGetDatum('b'); /* assume it's binary */ - values[i++] = BoolGetDatum(false); - values[i++] = BoolGetDatum(false); - values[i++] = ObjectIdGetDatum(leftTypeId); - values[i++] = ObjectIdGetDatum(rightTypeId); - values[i++] = ObjectIdGetDatum(InvalidOid); - values[i++] = ObjectIdGetDatum(InvalidOid); - values[i++] = ObjectIdGetDatum(InvalidOid); - values[i++] = ObjectIdGetDatum(InvalidOid); - values[i++] = ObjectIdGetDatum(InvalidOid); - values[i++] = ObjectIdGetDatum(InvalidOid); - values[i++] = ObjectIdGetDatum(InvalidOid); - values[i++] = ObjectIdGetDatum(InvalidOid); + values[i++] = NameGetDatum(&oname); /* oprname */ + values[i++] = ObjectIdGetDatum(operatorNamespace); /* oprnamespace */ + values[i++] = Int32GetDatum(GetUserId()); /* oprowner */ + values[i++] = UInt16GetDatum(0); /* oprprec */ + values[i++] = CharGetDatum(leftTypeId ? (rightTypeId ? 'b' : 'r') : 'l'); /* oprkind */ + values[i++] = BoolGetDatum(false); /* oprisleft */ + values[i++] = BoolGetDatum(false); /* oprcanhash */ + values[i++] = ObjectIdGetDatum(leftTypeId); /* oprleft */ + values[i++] = ObjectIdGetDatum(rightTypeId); /* oprright */ + values[i++] = ObjectIdGetDatum(InvalidOid); /* oprresult */ + values[i++] = ObjectIdGetDatum(InvalidOid); /* oprcom */ + values[i++] = ObjectIdGetDatum(InvalidOid); /* oprnegate */ + values[i++] = ObjectIdGetDatum(InvalidOid); /* oprlsortop */ + values[i++] = ObjectIdGetDatum(InvalidOid); /* oprrsortop */ + values[i++] = ObjectIdGetDatum(InvalidOid); /* oprltcmpop */ + values[i++] = ObjectIdGetDatum(InvalidOid); /* oprgtcmpop */ + values[i++] = ObjectIdGetDatum(InvalidOid); /* oprcode */ + values[i++] = ObjectIdGetDatum(InvalidOid); /* oprrest */ + values[i++] = ObjectIdGetDatum(InvalidOid); /* oprjoin */ + + /* + * open pg_operator + */ + pg_operator_desc = heap_openr(OperatorRelationName, RowExclusiveLock); + tupDesc = pg_operator_desc->rd_att; /* * create a new operator tuple */ - tupDesc = pg_operator_desc->rd_att; - tup = heap_formtuple(tupDesc, values, nulls); /* @@ -293,8 +281,26 @@ OperatorShellMake(const char *operatorName, return operatorObjectId; } -/* -------------------------------- - * OperatorDef +/* + * OperatorCreate + * + * "X" indicates an optional argument (i.e. one that can be NULL or 0) + * operatorName name for new operator + * operatorNamespace namespace for new operator + * leftTypeId X left type ID + * rightTypeId X right type ID + * procedureName procedure for operator + * precedence operator precedence + * isLeftAssociative operator is left associative + * commutatorName X commutator operator + * negatorName X negator operator + * restrictionName X restriction sel. procedure + * joinName X join sel. procedure + * canHash hash join can be used with this operator + * leftSortName X left sort operator (for merge join) + * rightSortName X right sort operator (for merge join) + * ltCompareName X LR compare operator (for merge join) * * This routine gets complicated because it allows the user to * specify operators that do not exist. For example, if operator @@ -354,68 +360,73 @@ OperatorShellMake(const char *operatorName, * else if a new operator is being created * create a tuple using heap_formtuple * call heap_insert - * -------------------------------- - * "X" indicates an optional argument (i.e. one that can be NULL) - * operatorName; -- operator name - * leftTypeId; -- X left type id - * rightTypeId; -- X right type id - * procedureName; -- procedure name for operator code - * precedence; -- operator precedence - * isLeftAssociative; -- operator is left associative? - * commutatorName; -- X commutator operator name - * negatorName; -- X negator operator name - * restrictionName; -- X restriction sel. procedure name - * joinName; -- X join sel. procedure name - * canHash; -- can hash join be used with operator? - * leftSortName; -- X left sort operator (for merge join) - * rightSortName; -- X right sort operator (for merge join) */ -static void -OperatorDef(const char *operatorName, - Oid leftTypeId, - Oid rightTypeId, - List *procedureName, - uint16 precedence, - bool isLeftAssociative, - const char *commutatorName, - const char *negatorName, - List *restrictionName, - List *joinName, - bool canHash, - const char *leftSortName, - const char *rightSortName) +void +OperatorCreate(const char *operatorName, + Oid operatorNamespace, + Oid leftTypeId, + Oid rightTypeId, + List *procedureName, + uint16 precedence, + bool isLeftAssociative, + List *commutatorName, + List *negatorName, + List *restrictionName, + List *joinName, + bool canHash, + List *leftSortName, + List *rightSortName, + List *ltCompareName, + List *gtCompareName) { Relation pg_operator_desc; - HeapScanDesc pg_operator_scan; HeapTuple tup; char nulls[Natts_pg_operator]; char replaces[Natts_pg_operator]; Datum values[Natts_pg_operator]; Oid operatorObjectId; bool operatorAlreadyDefined; - Oid commutatorId = InvalidOid; - Oid negatorId = InvalidOid; + Oid procOid; + Oid operResultType; + Oid commutatorId, + negatorId, + leftSortId, + rightSortId, + ltCompareId, + gtCompareId, + restOid, + joinOid; bool selfCommutator = false; - const char *name[4]; Oid typeId[FUNC_MAX_ARGS]; int nargs; - Oid procOid; NameData oname; TupleDesc tupDesc; - ScanKeyData opKey[3]; - int i, - j; + int i; /* - * validate operator name + * Sanity checks */ if (!validOperatorName(operatorName)) elog(ERROR, "\"%s\" is not a valid operator name", operatorName); - if (!(OidIsValid(leftTypeId) || OidIsValid(rightTypeId))) - elog(ERROR, "operator must have at least one operand type"); + if (!OidIsValid(leftTypeId) && !OidIsValid(rightTypeId)) + elog(ERROR, "at least one of leftarg or rightarg must be specified"); + + if (!(OidIsValid(leftTypeId) && OidIsValid(rightTypeId))) + { + /* If it's not a binary op, these things mustn't be set: */ + if (commutatorName) + elog(ERROR, "only binary operators can have commutators"); + if (joinName) + elog(ERROR, "only binary operators can have join selectivity"); + if (canHash) + elog(ERROR, "only binary operators can hash"); + if (leftSortName || rightSortName || ltCompareName || gtCompareName) + elog(ERROR, "only binary operators can mergejoin"); + } operatorObjectId = OperatorGet(operatorName, + operatorNamespace, leftTypeId, rightTypeId, &operatorAlreadyDefined); @@ -429,13 +440,6 @@ OperatorDef(const char *operatorName, * filling in a previously-created shell. */ - for (i = 0; i < Natts_pg_operator; ++i) - { - values[i] = (Datum) NULL; - replaces[i] = 'r'; - nulls[i] = ' '; - } - /* * Look up registered procedures -- find the return type of * procedureName to place in "result" field. Do this before shells are @@ -461,17 +465,13 @@ OperatorDef(const char *operatorName, procOid = LookupFuncName(procedureName, nargs, typeId); if (!OidIsValid(procOid)) func_error("OperatorDef", procedureName, nargs, typeId, NULL); - - values[Anum_pg_operator_oprcode - 1] = ObjectIdGetDatum(procOid); - values[Anum_pg_operator_oprresult - 1] = ObjectIdGetDatum(get_func_rettype(procOid)); + operResultType = get_func_rettype(procOid); /* * find restriction estimator */ if (restrictionName) - { /* optional */ - Oid restOid; - + { MemSet(typeId, 0, FUNC_MAX_ARGS * sizeof(Oid)); typeId[0] = 0; /* Query (opaque type) */ typeId[1] = OIDOID; /* operator OID */ @@ -481,19 +481,15 @@ OperatorDef(const char *operatorName, restOid = LookupFuncName(restrictionName, 4, typeId); if (!OidIsValid(restOid)) func_error("OperatorDef", restrictionName, 4, typeId, NULL); - - values[Anum_pg_operator_oprrest - 1] = ObjectIdGetDatum(restOid); } else - values[Anum_pg_operator_oprrest - 1] = ObjectIdGetDatum(InvalidOid); + restOid = InvalidOid; /* * find join estimator */ if (joinName) - { /* optional */ - Oid joinOid; - + { MemSet(typeId, 0, FUNC_MAX_ARGS * sizeof(Oid)); typeId[0] = 0; /* Query (opaque type) */ typeId[1] = OIDOID; /* operator OID */ @@ -502,170 +498,148 @@ OperatorDef(const char *operatorName, joinOid = LookupFuncName(joinName, 3, typeId); if (!OidIsValid(joinOid)) func_error("OperatorDef", joinName, 3, typeId, NULL); - - values[Anum_pg_operator_oprjoin - 1] = ObjectIdGetDatum(joinOid); } else - values[Anum_pg_operator_oprjoin - 1] = ObjectIdGetDatum(InvalidOid); + joinOid = InvalidOid; /* * set up values in the operator tuple */ + + for (i = 0; i < Natts_pg_operator; ++i) + { + values[i] = (Datum) NULL; + replaces[i] = 'r'; + nulls[i] = ' '; + } + i = 0; namestrcpy(&oname, operatorName); - values[i++] = NameGetDatum(&oname); - values[i++] = Int32GetDatum(GetUserId()); - values[i++] = UInt16GetDatum(precedence); - values[i++] = CharGetDatum(leftTypeId ? (rightTypeId ? 'b' : 'r') : 'l'); - values[i++] = BoolGetDatum(isLeftAssociative); - values[i++] = BoolGetDatum(canHash); - values[i++] = ObjectIdGetDatum(leftTypeId); - values[i++] = ObjectIdGetDatum(rightTypeId); - - ++i; /* Skip "oprresult", it was filled in - * above */ + values[i++] = NameGetDatum(&oname); /* oprname */ + values[i++] = ObjectIdGetDatum(operatorNamespace); /* oprnamespace */ + values[i++] = Int32GetDatum(GetUserId()); /* oprowner */ + values[i++] = UInt16GetDatum(precedence); /* oprprec */ + values[i++] = CharGetDatum(leftTypeId ? (rightTypeId ? 'b' : 'r') : 'l'); /* oprkind */ + values[i++] = BoolGetDatum(isLeftAssociative); /* oprisleft */ + values[i++] = BoolGetDatum(canHash); /* oprcanhash */ + values[i++] = ObjectIdGetDatum(leftTypeId); /* oprleft */ + values[i++] = ObjectIdGetDatum(rightTypeId); /* oprright */ + values[i++] = ObjectIdGetDatum(operResultType); /* oprresult */ /* * Set up the other operators. If they do not currently exist, create * shells in order to get ObjectId's. */ - name[0] = commutatorName; - name[1] = negatorName; - name[2] = leftSortName; - name[3] = rightSortName; - for (j = 0; j < 4; ++j) + if (commutatorName) { - if (name[j]) - { - Oid otherLeftTypeId = InvalidOid; - Oid otherRightTypeId = InvalidOid; - Oid other_oid = InvalidOid; - bool otherDefined = false; - - switch (j) - { - case 0: /* commutator has reversed arg types */ - otherLeftTypeId = rightTypeId; - otherRightTypeId = leftTypeId; - other_oid = OperatorGet(name[j], - otherLeftTypeId, - otherRightTypeId, - &otherDefined); - commutatorId = other_oid; - break; - case 1: /* negator has same arg types */ - otherLeftTypeId = leftTypeId; - otherRightTypeId = rightTypeId; - other_oid = OperatorGet(name[j], - otherLeftTypeId, - otherRightTypeId, - &otherDefined); - negatorId = other_oid; - break; - case 2: /* left sort op takes left-side data type */ - otherLeftTypeId = leftTypeId; - otherRightTypeId = leftTypeId; - other_oid = OperatorGet(name[j], - otherLeftTypeId, - otherRightTypeId, - &otherDefined); - break; - case 3: /* right sort op takes right-side data type */ - otherLeftTypeId = rightTypeId; - otherRightTypeId = rightTypeId; - other_oid = OperatorGet(name[j], - otherLeftTypeId, - otherRightTypeId, - &otherDefined); - break; - } - - if (OidIsValid(other_oid)) - { - /* other op already in catalogs */ - values[i++] = ObjectIdGetDatum(other_oid); - } - else if (strcmp(operatorName, name[j]) != 0 || - otherLeftTypeId != leftTypeId || - otherRightTypeId != rightTypeId) - { - /* not in catalogs, different from operator */ - other_oid = OperatorShellMake(name[j], - otherLeftTypeId, - otherRightTypeId); - if (!OidIsValid(other_oid)) - elog(ERROR, - "OperatorDef: can't create operator shell \"%s\"", - name[j]); - values[i++] = ObjectIdGetDatum(other_oid); - } - else - { - /* - * self-linkage to this operator; will fix below. Note - * that only self-linkage for commutation makes sense. - */ - if (j != 0) - elog(ERROR, - "operator cannot be its own negator or sort operator"); - selfCommutator = true; - values[i++] = ObjectIdGetDatum(InvalidOid); - } - } - else - { - /* other operator is omitted */ - values[i++] = ObjectIdGetDatum(InvalidOid); - } + /* commutator has reversed arg types */ + commutatorId = get_other_operator(commutatorName, + rightTypeId, leftTypeId, + operatorName, operatorNamespace, + leftTypeId, rightTypeId, + true); + /* + * self-linkage to this operator; will fix below. Note + * that only self-linkage for commutation makes sense. + */ + if (!OidIsValid(commutatorId)) + selfCommutator = true; } + else + commutatorId = InvalidOid; + values[i++] = ObjectIdGetDatum(commutatorId); /* oprcom */ - /* last three fields were filled in above */ + if (negatorName) + { + /* negator has same arg types */ + negatorId = get_other_operator(negatorName, + leftTypeId, rightTypeId, + operatorName, operatorNamespace, + leftTypeId, rightTypeId, + false); + } + else + negatorId = InvalidOid; + values[i++] = ObjectIdGetDatum(negatorId); /* oprnegate */ + + if (leftSortName) + { + /* left sort op takes left-side data type */ + leftSortId = get_other_operator(leftSortName, + leftTypeId, leftTypeId, + operatorName, operatorNamespace, + leftTypeId, rightTypeId, + false); + } + else + leftSortId = InvalidOid; + values[i++] = ObjectIdGetDatum(leftSortId); /* oprlsortop */ + + if (rightSortName) + { + /* right sort op takes right-side data type */ + rightSortId = get_other_operator(rightSortName, + rightTypeId, rightTypeId, + operatorName, operatorNamespace, + leftTypeId, rightTypeId, + false); + } + else + rightSortId = InvalidOid; + values[i++] = ObjectIdGetDatum(rightSortId); /* oprrsortop */ + + if (ltCompareName) + { + /* comparator has same arg types */ + ltCompareId = get_other_operator(ltCompareName, + leftTypeId, rightTypeId, + operatorName, operatorNamespace, + leftTypeId, rightTypeId, + false); + } + else + ltCompareId = InvalidOid; + values[i++] = ObjectIdGetDatum(ltCompareId); /* oprltcmpop */ + + if (gtCompareName) + { + /* comparator has same arg types */ + gtCompareId = get_other_operator(gtCompareName, + leftTypeId, rightTypeId, + operatorName, operatorNamespace, + leftTypeId, rightTypeId, + false); + } + else + gtCompareId = InvalidOid; + values[i++] = ObjectIdGetDatum(gtCompareId); /* oprgtcmpop */ + + values[i++] = ObjectIdGetDatum(procOid); /* oprcode */ + values[i++] = ObjectIdGetDatum(restOid); /* oprrest */ + values[i++] = ObjectIdGetDatum(joinOid); /* oprjoin */ pg_operator_desc = heap_openr(OperatorRelationName, RowExclusiveLock); /* - * If we are adding to an operator shell, get its t_self + * If we are adding to an operator shell, update; else insert */ if (operatorObjectId) { - /* Make sure we can see the shell even if it is new in current cmd */ - CommandCounterIncrement(); + tup = SearchSysCacheCopy(OPEROID, + ObjectIdGetDatum(operatorObjectId), + 0, 0, 0); + if (!HeapTupleIsValid(tup)) + elog(ERROR, "OperatorDef: operator %u not found", + operatorObjectId); - ScanKeyEntryInitialize(&opKey[0], 0x0, - Anum_pg_operator_oprname, - F_NAMEEQ, - PointerGetDatum(operatorName)); - ScanKeyEntryInitialize(&opKey[1], 0x0, - Anum_pg_operator_oprleft, - F_OIDEQ, - ObjectIdGetDatum(leftTypeId)); - ScanKeyEntryInitialize(&opKey[2], 0x0, - Anum_pg_operator_oprright, - F_OIDEQ, - ObjectIdGetDatum(rightTypeId)); + tup = heap_modifytuple(tup, + pg_operator_desc, + values, + nulls, + replaces); - pg_operator_scan = heap_beginscan(pg_operator_desc, - 0, - SnapshotSelf, /* no cache? */ - 3, - opKey); - - tup = heap_getnext(pg_operator_scan, 0); - if (HeapTupleIsValid(tup)) - { - tup = heap_modifytuple(tup, - pg_operator_desc, - values, - nulls, - replaces); - - simple_heap_update(pg_operator_desc, &tup->t_self, tup); - } - else - elog(ERROR, "OperatorDef: operator %u not found", operatorObjectId); - - heap_endscan(pg_operator_scan); + simple_heap_update(pg_operator_desc, &tup->t_self, tup); } else { @@ -676,6 +650,7 @@ OperatorDef(const char *operatorName, operatorObjectId = tup->t_data->t_oid; } + /* Must update the indexes in either case */ if (RelationGetForm(pg_operator_desc)->relhasindex) { Relation idescs[Num_pg_operator_indices]; @@ -705,7 +680,65 @@ OperatorDef(const char *operatorName, OperatorUpd(operatorObjectId, commutatorId, negatorId); } -/* ---------------------------------------------------------------- +/* + * Try to lookup another operator (commutator, etc) + * + * If not found, check to see if it is exactly the operator we are trying + * to define; if so, return InvalidOid. (Note that this case is only + * sensible for a commutator, so we error out otherwise.) If it is not + * the same operator, create a shell operator. + */ +static Oid +get_other_operator(List *otherOp, Oid otherLeftTypeId, Oid otherRightTypeId, + const char *operatorName, Oid operatorNamespace, + Oid leftTypeId, Oid rightTypeId, bool isCommutator) +{ + Oid other_oid; + bool otherDefined; + char *otherName; + Oid otherNamespace; + + other_oid = OperatorLookup(otherOp, + otherLeftTypeId, + otherRightTypeId, + &otherDefined); + + if (OidIsValid(other_oid)) + { + /* other op already in catalogs */ + return other_oid; + } + + otherNamespace = QualifiedNameGetCreationNamespace(otherOp, + &otherName); + + if (strcmp(otherName, operatorName) == 0 && + otherNamespace == operatorNamespace && + otherLeftTypeId == leftTypeId && + otherRightTypeId == rightTypeId) + { + /* + * self-linkage to this operator; caller will fix later. Note + * that only self-linkage for commutation makes sense. + */ + if (!isCommutator) + elog(ERROR, "operator cannot be its own negator or sort operator"); + return InvalidOid; + } + + /* not in catalogs, different from operator, so make shell */ + other_oid = OperatorShellMake(otherName, + otherNamespace, + otherLeftTypeId, + otherRightTypeId); + if (!OidIsValid(other_oid)) + elog(ERROR, + "OperatorDef: can't create operator shell \"%s\"", + NameListToString(otherOp)); + return other_oid; +} + +/* * OperatorUpd * * For a given operator, look up its negator and commutator operators. @@ -713,19 +746,16 @@ OperatorDef(const char *operatorName, * (respectively) are empty, then use the new operator for neg or comm. * This solves a problem for users who need to insert two new operators * which are the negator or commutator of each other. - * ---------------------------------------------------------------- */ static void OperatorUpd(Oid baseId, Oid commId, Oid negId) { int i; Relation pg_operator_desc; - HeapScanDesc pg_operator_scan; HeapTuple tup; char nulls[Natts_pg_operator]; char replaces[Natts_pg_operator]; Datum values[Natts_pg_operator]; - ScanKeyData opKey[1]; for (i = 0; i < Natts_pg_operator; ++i) { @@ -734,8 +764,6 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId) nulls[i] = ' '; } - pg_operator_desc = heap_openr(OperatorRelationName, RowExclusiveLock); - /* * check and update the commutator & negator, if necessary * @@ -743,18 +771,11 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId) */ CommandCounterIncrement(); - ScanKeyEntryInitialize(&opKey[0], 0x0, - ObjectIdAttributeNumber, - F_OIDEQ, - ObjectIdGetDatum(commId)); + pg_operator_desc = heap_openr(OperatorRelationName, RowExclusiveLock); - pg_operator_scan = heap_beginscan(pg_operator_desc, - 0, - SnapshotSelf, /* no cache? */ - 1, - opKey); - - tup = heap_getnext(pg_operator_scan, 0); + tup = SearchSysCacheCopy(OPEROID, + ObjectIdGetDatum(commId), + 0, 0, 0); /* * if the commutator and negator are the same operator, do one update. @@ -765,13 +786,10 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId) { if (HeapTupleIsValid(tup)) { - Form_pg_operator t; + Form_pg_operator t = (Form_pg_operator) GETSTRUCT(tup); - t = (Form_pg_operator) GETSTRUCT(tup); - if (!OidIsValid(t->oprcom) - || !OidIsValid(t->oprnegate)) + if (!OidIsValid(t->oprcom) || !OidIsValid(t->oprnegate)) { - if (!OidIsValid(t->oprnegate)) { values[Anum_pg_operator_oprnegate - 1] = ObjectIdGetDatum(baseId); @@ -802,7 +820,6 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId) } } } - heap_endscan(pg_operator_scan); heap_close(pg_operator_desc, RowExclusiveLock); @@ -816,6 +833,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId) { values[Anum_pg_operator_oprcom - 1] = ObjectIdGetDatum(baseId); replaces[Anum_pg_operator_oprcom - 1] = 'r'; + tup = heap_modifytuple(tup, pg_operator_desc, values, @@ -837,23 +855,18 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId) replaces[Anum_pg_operator_oprcom - 1] = ' '; } - heap_endscan(pg_operator_scan); - /* check and update the negator, if necessary */ - opKey[0].sk_argument = ObjectIdGetDatum(negId); - pg_operator_scan = heap_beginscan(pg_operator_desc, - 0, - SnapshotSelf, /* no cache? */ - 1, - opKey); + tup = SearchSysCacheCopy(OPEROID, + ObjectIdGetDatum(negId), + 0, 0, 0); - tup = heap_getnext(pg_operator_scan, 0); if (HeapTupleIsValid(tup) && !(OidIsValid(((Form_pg_operator) GETSTRUCT(tup))->oprnegate))) { values[Anum_pg_operator_oprnegate - 1] = ObjectIdGetDatum(baseId); replaces[Anum_pg_operator_oprnegate - 1] = 'r'; + tup = heap_modifytuple(tup, pg_operator_desc, values, @@ -872,79 +885,5 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId) } } - heap_endscan(pg_operator_scan); - heap_close(pg_operator_desc, RowExclusiveLock); } - - -/* ---------------------------------------------------------------- - * OperatorCreate - * - * This is now just an interface procedure for OperatorDef ... - * - * "X" indicates an optional argument (i.e. one that can be NULL or 0) - * operatorName; -- operator name - * leftTypeId; -- X left type ID - * rightTypeId; -- X right type ID - * procedureName; -- procedure for operator - * precedence; -- operator precedence - * isLeftAssociative; -- operator is left associative - * commutatorName; -- X commutator operator name - * negatorName; -- X negator operator name - * restrictionName; -- X restriction sel. procedure - * joinName; -- X join sel. procedure - * canHash; -- hash join can be used with this operator - * leftSortName; -- X left sort operator (for merge join) - * rightSortName; -- X right sort operator (for merge join) - */ -void -OperatorCreate(const char *operatorName, - Oid leftTypeId, - Oid rightTypeId, - const char *procedureName, - uint16 precedence, - bool isLeftAssociative, - const char *commutatorName, - const char *negatorName, - const char *restrictionName, - const char *joinName, - bool canHash, - const char *leftSortName, - const char *rightSortName) -{ - if (!OidIsValid(leftTypeId) && !OidIsValid(rightTypeId)) - elog(ERROR, "at least one of leftarg or rightarg must be specified"); - - if (!(OidIsValid(leftTypeId) && OidIsValid(rightTypeId))) - { - /* If it's not a binary op, these things mustn't be set: */ - if (commutatorName) - elog(ERROR, "only binary operators can have commutators"); - if (joinName) - elog(ERROR, "only binary operators can have join selectivity"); - if (canHash) - elog(ERROR, "only binary operators can hash"); - if (leftSortName || rightSortName) - elog(ERROR, "only binary operators can have sort links"); - } - - /* - * Use OperatorDef() to define the specified operator and also create - * shells for the operator's associated operators if they don't - * already exist. - */ - OperatorDef(operatorName, - leftTypeId, - rightTypeId, - makeList1(makeString((char*) procedureName)), /* XXX */ - precedence, - isLeftAssociative, - commutatorName, - negatorName, - restrictionName ? makeList1(makeString((char*) restrictionName)) : NIL, /* XXX */ - joinName ? makeList1(makeString((char*) joinName)) : NIL, /* XXX */ - canHash, - leftSortName, - rightSortName); -} diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c index e36f21273d5..f4c8e6919e1 100644 --- a/src/backend/commands/analyze.c +++ b/src/backend/commands/analyze.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.31 2002/04/12 20:38:20 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.32 2002/04/16 23:08:10 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -398,7 +398,7 @@ examine_attribute(Relation onerel, int attnum) return NULL; /* If column has no "=" operator, we can't do much of anything */ - func_operator = compatible_oper("=", + func_operator = compatible_oper(makeList1(makeString("=")), attr->atttypid, attr->atttypid, true); @@ -436,7 +436,7 @@ examine_attribute(Relation onerel, int attnum) stats->eqfunc = eqfunc; /* Is there a "<" operator with suitable semantics? */ - func_operator = compatible_oper("<", + func_operator = compatible_oper(makeList1(makeString("<")), attr->atttypid, attr->atttypid, true); diff --git a/src/backend/commands/comment.c b/src/backend/commands/comment.c index b7de77067db..3eb9a5eb67a 100644 --- a/src/backend/commands/comment.c +++ b/src/backend/commands/comment.c @@ -7,7 +7,7 @@ * Copyright (c) 1999-2001, PostgreSQL Global Development Group * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/comment.c,v 1.40 2002/04/11 19:59:57 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/comment.c,v 1.41 2002/04/16 23:08:10 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -28,6 +28,7 @@ #include "commands/comment.h" #include "miscadmin.h" #include "parser/parse_func.h" +#include "parser/parse_oper.h" #include "parser/parse_type.h" #include "parser/parse.h" #include "utils/acl.h" @@ -53,7 +54,7 @@ static void CommentRule(List *qualname, char *comment); static void CommentType(List *typename, char *comment); static void CommentAggregate(List *aggregate, List *arguments, char *comment); static void CommentProc(List *function, List *arguments, char *comment); -static void CommentOperator(List *qualname, List *arguments, char *comment); +static void CommentOperator(List *opername, List *arguments, char *comment); static void CommentTrigger(List *qualname, char *comment); @@ -643,63 +644,29 @@ CommentProc(List *function, List *arguments, char *comment) * to be visible for both operator and function. */ static void -CommentOperator(List *qualname, List *arguments, char *comment) +CommentOperator(List *opername, List *arguments, char *comment) { - char *opername = strVal(lfirst(qualname)); /* XXX */ TypeName *typenode1 = (TypeName *) lfirst(arguments); TypeName *typenode2 = (TypeName *) lsecond(arguments); - char oprtype = 0; - Form_pg_operator data; - HeapTuple optuple; - Oid oid, - leftoid = InvalidOid, - rightoid = InvalidOid; + Oid oid; - /* Attempt to fetch the left type oid, if specified */ - if (typenode1 != NULL) - leftoid = typenameTypeId(typenode1); + /* Look up the operator */ - /* Attempt to fetch the right type oid, if specified */ - if (typenode2 != NULL) - rightoid = typenameTypeId(typenode2); - - /* Determine operator type */ - - if (OidIsValid(leftoid) && (OidIsValid(rightoid))) - oprtype = 'b'; - else if (OidIsValid(leftoid)) - oprtype = 'r'; - else if (OidIsValid(rightoid)) - oprtype = 'l'; - else - elog(ERROR, "operator '%s' is of an illegal type'", opername); - - /* Attempt to fetch the operator oid */ - - optuple = SearchSysCache(OPERNAME, - PointerGetDatum(opername), - ObjectIdGetDatum(leftoid), - ObjectIdGetDatum(rightoid), - CharGetDatum(oprtype)); - if (!HeapTupleIsValid(optuple)) - elog(ERROR, "operator '%s' does not exist", opername); - - oid = optuple->t_data->t_oid; + oid = LookupOperNameTypeNames(opername, typenode1, typenode2, + "CommentOperator"); /* Valid user's ability to comment on this operator */ if (!pg_oper_ownercheck(oid, GetUserId())) elog(ERROR, "you are not permitted to comment on operator '%s'", - opername); + NameListToString(opername)); /* Get the procedure associated with the operator */ - data = (Form_pg_operator) GETSTRUCT(optuple); - oid = data->oprcode; + oid = get_opcode(oid); if (oid == InvalidOid) - elog(ERROR, "operator '%s' does not have an underlying function", opername); - - ReleaseSysCache(optuple); + elog(ERROR, "operator '%s' does not have an underlying function", + NameListToString(opername)); /* Call CreateComments() to create/drop the comments */ diff --git a/src/backend/commands/operatorcmds.c b/src/backend/commands/operatorcmds.c index 54f48928b41..ffc35ea1ae9 100644 --- a/src/backend/commands/operatorcmds.c +++ b/src/backend/commands/operatorcmds.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/operatorcmds.c,v 1.1 2002/04/15 05:22:03 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/operatorcmds.c,v 1.2 2002/04/16 23:08:10 tgl Exp $ * * DESCRIPTION * The "DefineFoo" routines take the parse tree and pick out the @@ -41,6 +41,7 @@ #include "commands/comment.h" #include "commands/defrem.h" #include "miscadmin.h" +#include "parser/parse_oper.h" #include "parser/parse_type.h" #include "utils/acl.h" #include "utils/syscache.h" @@ -59,23 +60,26 @@ DefineOperator(List *names, List *parameters) { char *oprName; Oid oprNamespace; - uint16 precedence = 0; /* operator precedence */ - bool canHash = false; /* operator hashes */ + uint16 precedence = 0; /* operator precedence */ + bool canHash = false; /* operator hashes */ + bool canMerge = false; /* operator merges */ bool isLeftAssociative = true; /* operator is left * associative */ - char *functionName = NULL; /* function for operator */ + List *functionName = NIL; /* function for operator */ TypeName *typeName1 = NULL; /* first type name */ TypeName *typeName2 = NULL; /* second type name */ Oid typeId1 = InvalidOid; /* types converted to OID */ Oid typeId2 = InvalidOid; - char *commutatorName = NULL; /* optional commutator operator + List *commutatorName = NIL; /* optional commutator operator * name */ - char *negatorName = NULL; /* optional negator operator name */ - char *restrictionName = NULL; /* optional restrict. sel. + List *negatorName = NIL; /* optional negator operator name */ + List *restrictionName = NIL; /* optional restrict. sel. * procedure */ - char *joinName = NULL; /* optional join sel. procedure name */ - char *sortName1 = NULL; /* optional first sort operator */ - char *sortName2 = NULL; /* optional second sort operator */ + List *joinName = NIL; /* optional join sel. procedure */ + List *leftSortName = NIL; /* optional left sort operator */ + List *rightSortName = NIL; /* optional right sort operator */ + List *ltCompareName = NIL; /* optional < compare operator */ + List *gtCompareName = NIL; /* optional > compare operator */ List *pl; /* Convert list of names to a name and namespace */ @@ -101,7 +105,7 @@ DefineOperator(List *names, List *parameters) elog(ERROR, "setof type not implemented for rightarg"); } else if (strcasecmp(defel->defname, "procedure") == 0) - functionName = defGetString(defel); + functionName = defGetQualifiedName(defel); else if (strcasecmp(defel->defname, "precedence") == 0) { /* NOT IMPLEMENTED (never worked in v4.2) */ @@ -113,19 +117,25 @@ DefineOperator(List *names, List *parameters) elog(NOTICE, "CREATE OPERATOR: associativity not implemented"); } else if (strcasecmp(defel->defname, "commutator") == 0) - commutatorName = defGetString(defel); + commutatorName = defGetQualifiedName(defel); else if (strcasecmp(defel->defname, "negator") == 0) - negatorName = defGetString(defel); + negatorName = defGetQualifiedName(defel); else if (strcasecmp(defel->defname, "restrict") == 0) - restrictionName = defGetString(defel); + restrictionName = defGetQualifiedName(defel); else if (strcasecmp(defel->defname, "join") == 0) - joinName = defGetString(defel); + joinName = defGetQualifiedName(defel); else if (strcasecmp(defel->defname, "hashes") == 0) canHash = TRUE; + else if (strcasecmp(defel->defname, "merges") == 0) + canMerge = TRUE; else if (strcasecmp(defel->defname, "sort1") == 0) - sortName1 = defGetString(defel); + leftSortName = defGetQualifiedName(defel); else if (strcasecmp(defel->defname, "sort2") == 0) - sortName2 = defGetString(defel); + rightSortName = defGetQualifiedName(defel); + else if (strcasecmp(defel->defname, "ltcmp") == 0) + ltCompareName = defGetQualifiedName(defel); + else if (strcasecmp(defel->defname, "gtcmp") == 0) + gtCompareName = defGetQualifiedName(defel); else { elog(WARNING, "DefineOperator: attribute \"%s\" not recognized", @@ -136,7 +146,7 @@ DefineOperator(List *names, List *parameters) /* * make sure we have our required definitions */ - if (functionName == NULL) + if (functionName == NIL) elog(ERROR, "Define: \"procedure\" unspecified"); /* Transform type names to type OIDs */ @@ -145,10 +155,31 @@ DefineOperator(List *names, List *parameters) if (typeName2) typeId2 = typenameTypeId(typeName2); + /* + * If any of the mergejoin support operators were given, then canMerge + * is implicit. If canMerge is specified or implicit, fill in default + * operator names for any missing mergejoin support operators. + */ + if (leftSortName || rightSortName || ltCompareName || gtCompareName) + canMerge = true; + + if (canMerge) + { + if (!leftSortName) + leftSortName = makeList1(makeString("<")); + if (!rightSortName) + rightSortName = makeList1(makeString("<")); + if (!ltCompareName) + ltCompareName = makeList1(makeString("<")); + if (!gtCompareName) + gtCompareName = makeList1(makeString(">")); + } + /* * now have OperatorCreate do all the work.. */ OperatorCreate(oprName, /* operator name */ + oprNamespace, /* namespace */ typeId1, /* left type id */ typeId2, /* right type id */ functionName, /* function for operator */ @@ -161,9 +192,10 @@ DefineOperator(List *names, List *parameters) * procedure */ joinName, /* optional join sel. procedure name */ canHash, /* operator hashes */ - sortName1, /* optional first sort operator */ - sortName2); /* optional second sort operator */ - + leftSortName, /* optional left sort operator */ + rightSortName, /* optional right sort operator */ + ltCompareName, /* optional < comparison op */ + gtCompareName); /* optional < comparison op */ } @@ -178,70 +210,36 @@ DefineOperator(List *names, List *parameters) * ... */ void -RemoveOperator(char *operatorName, /* operator name */ +RemoveOperator(List *operatorName, /* operator name */ TypeName *typeName1, /* left argument type name */ TypeName *typeName2) /* right argument type name */ { + Oid operOid; Relation relation; HeapTuple tup; - Oid typeId1 = InvalidOid; - Oid typeId2 = InvalidOid; - char oprtype; - if (typeName1) - typeId1 = typenameTypeId(typeName1); - - if (typeName2) - typeId2 = typenameTypeId(typeName2); - - if (OidIsValid(typeId1) && OidIsValid(typeId2)) - oprtype = 'b'; - else if (OidIsValid(typeId1)) - oprtype = 'r'; - else - oprtype = 'l'; + operOid = LookupOperNameTypeNames(operatorName, typeName1, typeName2, + "RemoveOperator"); relation = heap_openr(OperatorRelationName, RowExclusiveLock); - tup = SearchSysCacheCopy(OPERNAME, - PointerGetDatum(operatorName), - ObjectIdGetDatum(typeId1), - ObjectIdGetDatum(typeId2), - CharGetDatum(oprtype)); + tup = SearchSysCacheCopy(OPEROID, + ObjectIdGetDatum(operOid), + 0, 0, 0); - if (HeapTupleIsValid(tup)) - { - if (!pg_oper_ownercheck(tup->t_data->t_oid, GetUserId())) - elog(ERROR, "RemoveOperator: operator '%s': permission denied", - operatorName); + if (!HeapTupleIsValid(tup)) /* should not happen */ + elog(ERROR, "RemoveOperator: failed to find tuple for operator '%s'", + NameListToString(operatorName)); - /* Delete any comments associated with this operator */ - DeleteComments(tup->t_data->t_oid, RelationGetRelid(relation)); + if (!pg_oper_ownercheck(operOid, GetUserId())) + elog(ERROR, "RemoveOperator: operator '%s': permission denied", + NameListToString(operatorName)); + + /* Delete any comments associated with this operator */ + DeleteComments(operOid, RelationGetRelid(relation)); + + simple_heap_delete(relation, &tup->t_self); - simple_heap_delete(relation, &tup->t_self); - } - else - { - if (OidIsValid(typeId1) && OidIsValid(typeId2)) - { - elog(ERROR, "RemoveOperator: binary operator '%s' taking '%s' and '%s' does not exist", - operatorName, - TypeNameToString(typeName1), - TypeNameToString(typeName2)); - } - else if (OidIsValid(typeId1)) - { - elog(ERROR, "RemoveOperator: right unary operator '%s' taking '%s' does not exist", - operatorName, - TypeNameToString(typeName1)); - } - else - { - elog(ERROR, "RemoveOperator: left unary operator '%s' taking '%s' does not exist", - operatorName, - TypeNameToString(typeName2)); - } - } heap_freetuple(tup); heap_close(relation, RowExclusiveLock); } diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c index 3ccbcd8efc8..6ded8c5604a 100644 --- a/src/backend/executor/nodeAgg.c +++ b/src/backend/executor/nodeAgg.c @@ -46,7 +46,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/nodeAgg.c,v 1.81 2002/04/11 19:59:58 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/nodeAgg.c,v 1.82 2002/04/16 23:08:10 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -925,7 +925,8 @@ ExecInitAgg(Agg *node, EState *estate, Plan *parent) &peraggstate->inputtypeLen, &peraggstate->inputtypeByVal); - eq_function = compatible_oper_funcid("=", inputType, inputType, + eq_function = compatible_oper_funcid(makeList1(makeString("=")), + inputType, inputType, true); if (!OidIsValid(eq_function)) elog(ERROR, "Unable to identify an equality operator for type '%s'", diff --git a/src/backend/executor/nodeGroup.c b/src/backend/executor/nodeGroup.c index e3aea3b789b..881dfa4f1ba 100644 --- a/src/backend/executor/nodeGroup.c +++ b/src/backend/executor/nodeGroup.c @@ -15,7 +15,7 @@ * locate group boundaries. * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/nodeGroup.c,v 1.44 2001/10/25 05:49:28 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/nodeGroup.c,v 1.45 2002/04/16 23:08:10 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -490,7 +490,8 @@ execTuplesMatchPrepare(TupleDesc tupdesc, Oid typid = tupdesc->attrs[att - 1]->atttypid; Oid eq_function; - eq_function = compatible_oper_funcid("=", typid, typid, true); + eq_function = compatible_oper_funcid(makeList1(makeString("=")), + typid, typid, true); if (!OidIsValid(eq_function)) elog(ERROR, "Unable to identify an equality operator for type '%s'", typeidTypeName(typid)); diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c index 5eed3a33f51..40e1dea79e3 100644 --- a/src/backend/nodes/copyfuncs.c +++ b/src/backend/nodes/copyfuncs.c @@ -15,7 +15,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.177 2002/04/11 19:59:59 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.178 2002/04/16 23:08:10 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1526,8 +1526,7 @@ _copyAExpr(A_Expr *from) A_Expr *newnode = makeNode(A_Expr); newnode->oper = from->oper; - if (from->opname) - newnode->opname = pstrdup(from->opname); + Node_Copy(from, newnode, name); Node_Copy(from, newnode, lexpr); Node_Copy(from, newnode, rexpr); @@ -1648,8 +1647,7 @@ _copySortGroupBy(SortGroupBy *from) { SortGroupBy *newnode = makeNode(SortGroupBy); - if (from->useOp) - newnode->useOp = pstrdup(from->useOp); + Node_Copy(from, newnode, useOp); Node_Copy(from, newnode, node); return newnode; @@ -2128,7 +2126,7 @@ _copyRemoveOperStmt(RemoveOperStmt *from) { RemoveOperStmt *newnode = makeNode(RemoveOperStmt); - newnode->opname = pstrdup(from->opname); + Node_Copy(from, newnode, opname); Node_Copy(from, newnode, args); return newnode; diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c index cafd77a8220..245d72fc014 100644 --- a/src/backend/nodes/equalfuncs.c +++ b/src/backend/nodes/equalfuncs.c @@ -20,7 +20,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.125 2002/04/11 19:59:59 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.126 2002/04/16 23:08:10 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -969,7 +969,7 @@ _equalRemoveFuncStmt(RemoveFuncStmt *a, RemoveFuncStmt *b) static bool _equalRemoveOperStmt(RemoveOperStmt *a, RemoveOperStmt *b) { - if (!equalstr(a->opname, b->opname)) + if (!equal(a->opname, b->opname)) return false; if (!equal(a->args, b->args)) return false; @@ -1400,7 +1400,7 @@ _equalAExpr(A_Expr *a, A_Expr *b) { if (a->oper != b->oper) return false; - if (!equalstr(a->opname, b->opname)) + if (!equal(a->name, b->name)) return false; if (!equal(a->lexpr, b->lexpr)) return false; @@ -1520,7 +1520,7 @@ _equalTypeCast(TypeCast *a, TypeCast *b) static bool _equalSortGroupBy(SortGroupBy *a, SortGroupBy *b) { - if (!equalstr(a->useOp, b->useOp)) + if (!equal(a->useOp, b->useOp)) return false; if (!equal(a->node, b->node)) return false; diff --git a/src/backend/nodes/makefuncs.c b/src/backend/nodes/makefuncs.c index 6d649ba9d1f..65f4ffcca37 100644 --- a/src/backend/nodes/makefuncs.c +++ b/src/backend/nodes/makefuncs.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/nodes/makefuncs.c,v 1.30 2002/03/29 19:06:09 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/makefuncs.c,v 1.31 2002/04/16 23:08:10 tgl Exp $ */ #include "postgres.h" @@ -16,6 +16,39 @@ #include "utils/lsyscache.h" +/* + * makeA_Expr - + * makes an A_Expr node + */ +A_Expr * +makeA_Expr(int oper, List *name, Node *lexpr, Node *rexpr) +{ + A_Expr *a = makeNode(A_Expr); + + a->oper = oper; + a->name = name; + a->lexpr = lexpr; + a->rexpr = rexpr; + return a; +} + +/* + * makeSimpleA_Expr - + * As above, given a simple (unqualified) operator name + */ +A_Expr * +makeSimpleA_Expr(int oper, const char *name, + Node *lexpr, Node *rexpr) +{ + A_Expr *a = makeNode(A_Expr); + + a->oper = oper; + a->name = makeList1(makeString((char *) name)); + a->lexpr = lexpr; + a->rexpr = rexpr; + return a; +} + /* * makeOper - * creates an Oper node diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c index 09a3eb767f2..65a501c429a 100644 --- a/src/backend/nodes/outfuncs.c +++ b/src/backend/nodes/outfuncs.c @@ -5,7 +5,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.154 2002/04/11 19:59:59 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.155 2002/04/16 23:08:10 tgl Exp $ * * NOTES * Every (plan) node in POSTGRES has an associated "out" routine which @@ -1285,7 +1285,7 @@ _outAExpr(StringInfo str, A_Expr *node) appendStringInfo(str, "NOT "); break; case OP: - _outToken(str, node->opname); + _outNode(str, node->name); appendStringInfo(str, " "); break; default: diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c index 60a7dd95038..21599b08bd7 100644 --- a/src/backend/optimizer/path/indxpath.c +++ b/src/backend/optimizer/path/indxpath.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.115 2002/04/05 00:31:26 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.116 2002/04/16 23:08:10 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -21,6 +21,7 @@ #include "access/nbtree.h" #include "catalog/catname.h" #include "catalog/pg_amop.h" +#include "catalog/pg_namespace.h" #include "catalog/pg_operator.h" #include "executor/executor.h" #include "nodes/makefuncs.h" @@ -911,7 +912,8 @@ indexable_operator(Expr *clause, Oid opclass, bool indexkey_on_left) * operator, but in practice that seems pretty unlikely for * binary-compatible types.) */ - new_op = compatible_oper_opid(opname, indexkeytype, indexkeytype, true); + new_op = compatible_oper_opid(makeList1(makeString(opname)), + indexkeytype, indexkeytype, true); if (OidIsValid(new_op)) { @@ -2143,14 +2145,15 @@ network_prefix_quals(Var *leftop, Oid expr_op, Datum rightop) */ /* See if there is a binary op of the given name for the given datatype */ +/* NB: we assume that only built-in system operators are searched for */ static Oid find_operator(const char *opname, Oid datatype) { - return GetSysCacheOid(OPERNAME, + return GetSysCacheOid(OPERNAMENSP, PointerGetDatum(opname), ObjectIdGetDatum(datatype), ObjectIdGetDatum(datatype), - CharGetDatum('b')); + ObjectIdGetDatum(PG_CATALOG_NAMESPACE)); } /* diff --git a/src/backend/optimizer/plan/initsplan.c b/src/backend/optimizer/plan/initsplan.c index 2c9acc73b7f..39ac5ba8866 100644 --- a/src/backend/optimizer/plan/initsplan.c +++ b/src/backend/optimizer/plan/initsplan.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/initsplan.c,v 1.67 2002/03/12 00:51:45 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/initsplan.c,v 1.68 2002/04/16 23:08:10 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -740,7 +740,8 @@ process_implied_equality(Query *root, Node *item1, Node *item2, */ ltype = exprType(item1); rtype = exprType(item2); - eq_operator = compatible_oper("=", ltype, rtype, true); + eq_operator = compatible_oper(makeList1(makeString("=")), + ltype, rtype, true); if (!HeapTupleIsValid(eq_operator)) { /* diff --git a/src/backend/optimizer/plan/subselect.c b/src/backend/optimizer/plan/subselect.c index 94a198473db..a67eb5d8e54 100644 --- a/src/backend/optimizer/plan/subselect.c +++ b/src/backend/optimizer/plan/subselect.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/subselect.c,v 1.50 2001/11/30 19:24:15 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/subselect.c,v 1.51 2002/04/16 23:08:11 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -284,9 +284,9 @@ make_subplan(SubLink *slink) * Note: we use make_operand in case runtime type conversion * function calls must be inserted for this operator! */ - left = make_operand("", lefthand, + left = make_operand(lefthand, exprType(lefthand), opform->oprleft); - right = make_operand("", (Node *) prm, + right = make_operand((Node *) prm, prm->paramtype, opform->oprright); ReleaseSysCache(tup); @@ -433,9 +433,9 @@ make_subplan(SubLink *slink) * Note: we use make_operand in case runtime type conversion * function calls must be inserted for this operator! */ - left = make_operand("", lefthand, + left = make_operand(lefthand, exprType(lefthand), opform->oprleft); - right = make_operand("", (Node *) con, + right = make_operand((Node *) con, con->consttype, opform->oprright); ReleaseSysCache(tup); diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c index f71f40829c6..6a68adfff37 100644 --- a/src/backend/parser/analyze.c +++ b/src/backend/parser/analyze.c @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.229 2002/04/12 19:11:49 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.230 2002/04/16 23:08:11 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1460,11 +1460,13 @@ transformFKConstraints(ParseState *pstate, CreateStmtContext *cxt) { /* * fktypoid[i] is the foreign key table's i'th element's type - * oid pktypoid[i] is the primary key table's i'th element's - * type oid We let oper() do our work for us, including - * elog(ERROR) if the types don't compare with = + * pktypoid[i] is the primary key table's i'th element's type + * + * We let oper() do our work for us, including elog(ERROR) if + * the types don't compare with = */ - Operator o = oper("=", fktypoid[i], pktypoid[i], false); + Operator o = oper(makeList1(makeString("=")), + fktypoid[i], pktypoid[i], false); ReleaseSysCache(o); } diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index 3488fb0762f..26b1be11d82 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -11,7 +11,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.301 2002/04/09 20:35:51 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.302 2002/04/16 23:08:11 tgl Exp $ * * HISTORY * AUTHOR DATE MAJOR EVENT @@ -82,11 +82,10 @@ static int pfunc_num_args; */ /*#define __YYSCLASS*/ -static Node *makeA_Expr(int oper, char *opname, Node *lexpr, Node *rexpr); static Node *makeTypeCast(Node *arg, TypeName *typename); static Node *makeStringConst(char *str, TypeName *typename); static Node *makeFloatConst(char *str); -static Node *makeRowExpr(char *opr, List *largs, List *rargs); +static Node *makeRowExpr(List *opr, List *largs, List *rargs); static SelectStmt *findLeftmostSelect(SelectStmt *node); static void insertSelectOptions(SelectStmt *stmt, List *sortClause, List *forUpdate, @@ -177,13 +176,13 @@ static bool set_name_needs_quotes(const char *name); database_name, access_method_clause, access_method, attr_name, class, index_name, name, function_name, file_name -%type func_name, handler_name +%type func_name, handler_name, qual_Op, qual_all_Op, OptUseOp %type qualified_name, OptConstrFromTable %type opt_id, all_Op, MathOp, opt_name, - OptUseOp, opt_class, SpecialRuleRelation + opt_class, SpecialRuleRelation %type opt_level, opt_encoding %type grantee @@ -202,7 +201,7 @@ static bool set_name_needs_quotes(const char *name); opt_column_list, columnList, opt_name_list, sort_clause, sortby_list, index_params, index_list, name_list, from_clause, from_list, opt_array_bounds, qualified_name_list, - any_name, any_name_list, expr_list, dotted_name, attrs, + any_name, any_name_list, any_operator, expr_list, dotted_name, attrs, target_list, update_target_list, insert_column_list, insert_target_list, def_list, opt_indirection, group_clause, TriggerFuncArgs, @@ -404,7 +403,7 @@ static bool set_name_needs_quotes(const char *name); %nonassoc BETWEEN %nonassoc IN %left POSTFIXOP /* dummy for postfix Op rules */ -%left Op /* multi-character ops and user-defined operators */ +%left Op OPERATOR /* multi-character ops and user-defined operators */ %nonassoc NOTNULL %nonassoc ISNULL %nonassoc IS NULL_P TRUE_P FALSE_P UNKNOWN /* sets precedence for IS NULL, etc */ @@ -2086,11 +2085,11 @@ DefineStmt: CREATE AGGREGATE func_name definition n->definition = $4; $$ = (Node *)n; } - | CREATE OPERATOR all_Op definition + | CREATE OPERATOR any_operator definition { DefineStmt *n = makeNode(DefineStmt); n->defType = OPERATOR; - n->defnames = makeList1(makeString($3)); /* XXX */ + n->defnames = $3; n->definition = $4; $$ = (Node *)n; } @@ -2227,11 +2226,11 @@ CommentStmt: COMMENT ON comment_type any_name IS comment_text n->comment = $7; $$ = (Node *) n; } - | COMMENT ON OPERATOR all_Op '(' oper_argtypes ')' IS comment_text + | COMMENT ON OPERATOR any_operator '(' oper_argtypes ')' IS comment_text { CommentStmt *n = makeNode(CommentStmt); n->objtype = OPERATOR; - n->objname = makeList1(makeString($4)); /* XXX */ + n->objname = $4; n->objargs = $6; n->comment = $9; $$ = (Node *) n; @@ -2812,7 +2811,7 @@ aggr_argtype: Typename { $$ = $1; } | '*' { $$ = NULL; } ; -RemoveOperStmt: DROP OPERATOR all_Op '(' oper_argtypes ')' +RemoveOperStmt: DROP OPERATOR any_operator '(' oper_argtypes ')' { RemoveOperStmt *n = makeNode(RemoveOperStmt); n->opname = $3; @@ -2833,6 +2832,12 @@ oper_argtypes: Typename { $$ = makeList2($1, NULL); } ; +any_operator: all_Op + { $$ = makeList1(makeString($1)); } + | ColId '.' any_operator + { $$ = lcons(makeString($1), $3); } + ; + /***************************************************************************** * @@ -3831,10 +3836,14 @@ sortby: a_expr OptUseOp } ; -OptUseOp: USING all_Op { $$ = $2; } - | ASC { $$ = "<"; } - | DESC { $$ = ">"; } - | /*EMPTY*/ { $$ = "<"; /*default*/ } +OptUseOp: USING qual_all_Op + { $$ = $2; } + | ASC + { $$ = makeList1(makeString("<")); } + | DESC + { $$ = makeList1(makeString(">")); } + | /*EMPTY*/ + { $$ = makeList1(makeString("<")); /*default*/ } ; @@ -4593,7 +4602,7 @@ row_expr: '(' row_descriptor ')' IN select_with_parens { SubLink *n = makeNode(SubLink); n->lefthand = $2; - n->oper = (List *) makeA_Expr(OP, "=", NULL, NULL); + n->oper = (List *) makeSimpleA_Expr(OP, "=", NULL, NULL); n->useor = FALSE; n->subLinkType = ANY_SUBLINK; n->subselect = $5; @@ -4603,18 +4612,18 @@ row_expr: '(' row_descriptor ')' IN select_with_parens { SubLink *n = makeNode(SubLink); n->lefthand = $2; - n->oper = (List *) makeA_Expr(OP, "<>", NULL, NULL); + n->oper = (List *) makeSimpleA_Expr(OP, "<>", NULL, NULL); n->useor = TRUE; n->subLinkType = ALL_SUBLINK; n->subselect = $6; $$ = (Node *)n; } - | '(' row_descriptor ')' all_Op sub_type select_with_parens + | '(' row_descriptor ')' qual_all_Op sub_type select_with_parens %prec Op { SubLink *n = makeNode(SubLink); n->lefthand = $2; n->oper = (List *) makeA_Expr(OP, $4, NULL, NULL); - if (strcmp($4, "<>") == 0) + if (strcmp(strVal(llast($4)), "<>") == 0) n->useor = TRUE; else n->useor = FALSE; @@ -4622,12 +4631,12 @@ row_expr: '(' row_descriptor ')' IN select_with_parens n->subselect = $6; $$ = (Node *)n; } - | '(' row_descriptor ')' all_Op select_with_parens + | '(' row_descriptor ')' qual_all_Op select_with_parens %prec Op { SubLink *n = makeNode(SubLink); n->lefthand = $2; n->oper = (List *) makeA_Expr(OP, $4, NULL, NULL); - if (strcmp($4, "<>") == 0) + if (strcmp(strVal(llast($4)), "<>") == 0) n->useor = TRUE; else n->useor = FALSE; @@ -4635,7 +4644,7 @@ row_expr: '(' row_descriptor ')' IN select_with_parens n->subselect = $5; $$ = (Node *)n; } - | '(' row_descriptor ')' all_Op '(' row_descriptor ')' + | '(' row_descriptor ')' qual_all_Op '(' row_descriptor ')' %prec Op { $$ = makeRowExpr($4, $2, $6); } @@ -4696,6 +4705,18 @@ MathOp: '+' { $$ = "+"; } | '=' { $$ = "="; } ; +qual_Op: Op + { $$ = makeList1(makeString($1)); } + | OPERATOR '(' any_operator ')' + { $$ = $3; } + ; + +qual_all_Op: all_Op + { $$ = makeList1(makeString($1)); } + | OPERATOR '(' any_operator ')' + { $$ = $3; } + ; + /* * General expressions * This is the heart of the expression syntax. @@ -4735,52 +4756,52 @@ a_expr: c_expr * also to b_expr and to the MathOp list above. */ | '+' a_expr %prec UMINUS - { $$ = makeA_Expr(OP, "+", NULL, $2); } + { $$ = (Node *) makeSimpleA_Expr(OP, "+", NULL, $2); } | '-' a_expr %prec UMINUS { $$ = doNegate($2); } | '%' a_expr - { $$ = makeA_Expr(OP, "%", NULL, $2); } + { $$ = (Node *) makeSimpleA_Expr(OP, "%", NULL, $2); } | '^' a_expr - { $$ = makeA_Expr(OP, "^", NULL, $2); } + { $$ = (Node *) makeSimpleA_Expr(OP, "^", NULL, $2); } | a_expr '%' - { $$ = makeA_Expr(OP, "%", $1, NULL); } + { $$ = (Node *) makeSimpleA_Expr(OP, "%", $1, NULL); } | a_expr '^' - { $$ = makeA_Expr(OP, "^", $1, NULL); } + { $$ = (Node *) makeSimpleA_Expr(OP, "^", $1, NULL); } | a_expr '+' a_expr - { $$ = makeA_Expr(OP, "+", $1, $3); } + { $$ = (Node *) makeSimpleA_Expr(OP, "+", $1, $3); } | a_expr '-' a_expr - { $$ = makeA_Expr(OP, "-", $1, $3); } + { $$ = (Node *) makeSimpleA_Expr(OP, "-", $1, $3); } | a_expr '*' a_expr - { $$ = makeA_Expr(OP, "*", $1, $3); } + { $$ = (Node *) makeSimpleA_Expr(OP, "*", $1, $3); } | a_expr '/' a_expr - { $$ = makeA_Expr(OP, "/", $1, $3); } + { $$ = (Node *) makeSimpleA_Expr(OP, "/", $1, $3); } | a_expr '%' a_expr - { $$ = makeA_Expr(OP, "%", $1, $3); } + { $$ = (Node *) makeSimpleA_Expr(OP, "%", $1, $3); } | a_expr '^' a_expr - { $$ = makeA_Expr(OP, "^", $1, $3); } + { $$ = (Node *) makeSimpleA_Expr(OP, "^", $1, $3); } | a_expr '<' a_expr - { $$ = makeA_Expr(OP, "<", $1, $3); } + { $$ = (Node *) makeSimpleA_Expr(OP, "<", $1, $3); } | a_expr '>' a_expr - { $$ = makeA_Expr(OP, ">", $1, $3); } + { $$ = (Node *) makeSimpleA_Expr(OP, ">", $1, $3); } | a_expr '=' a_expr - { $$ = makeA_Expr(OP, "=", $1, $3); } + { $$ = (Node *) makeSimpleA_Expr(OP, "=", $1, $3); } - | a_expr Op a_expr - { $$ = makeA_Expr(OP, $2, $1, $3); } - | Op a_expr - { $$ = makeA_Expr(OP, $1, NULL, $2); } - | a_expr Op %prec POSTFIXOP - { $$ = makeA_Expr(OP, $2, $1, NULL); } + | a_expr qual_Op a_expr %prec Op + { $$ = (Node *) makeA_Expr(OP, $2, $1, $3); } + | qual_Op a_expr %prec Op + { $$ = (Node *) makeA_Expr(OP, $1, NULL, $2); } + | a_expr qual_Op %prec POSTFIXOP + { $$ = (Node *) makeA_Expr(OP, $2, $1, NULL); } | a_expr AND a_expr - { $$ = makeA_Expr(AND, NULL, $1, $3); } + { $$ = (Node *) makeA_Expr(AND, NIL, $1, $3); } | a_expr OR a_expr - { $$ = makeA_Expr(OR, NULL, $1, $3); } + { $$ = (Node *) makeA_Expr(OR, NIL, $1, $3); } | NOT a_expr - { $$ = makeA_Expr(NOT, NULL, NULL, $2); } + { $$ = (Node *) makeA_Expr(NOT, NIL, NULL, $2); } | a_expr LIKE a_expr - { $$ = makeA_Expr(OP, "~~", $1, $3); } + { $$ = (Node *) makeSimpleA_Expr(OP, "~~", $1, $3); } | a_expr LIKE a_expr ESCAPE a_expr { FuncCall *n = makeNode(FuncCall); @@ -4788,10 +4809,10 @@ a_expr: c_expr n->args = makeList2($3, $5); n->agg_star = FALSE; n->agg_distinct = FALSE; - $$ = makeA_Expr(OP, "~~", $1, (Node *) n); + $$ = (Node *) makeSimpleA_Expr(OP, "~~", $1, (Node *) n); } | a_expr NOT LIKE a_expr - { $$ = makeA_Expr(OP, "!~~", $1, $4); } + { $$ = (Node *) makeSimpleA_Expr(OP, "!~~", $1, $4); } | a_expr NOT LIKE a_expr ESCAPE a_expr { FuncCall *n = makeNode(FuncCall); @@ -4799,10 +4820,10 @@ a_expr: c_expr n->args = makeList2($4, $6); n->agg_star = FALSE; n->agg_distinct = FALSE; - $$ = makeA_Expr(OP, "!~~", $1, (Node *) n); + $$ = (Node *) makeSimpleA_Expr(OP, "!~~", $1, (Node *) n); } | a_expr ILIKE a_expr - { $$ = makeA_Expr(OP, "~~*", $1, $3); } + { $$ = (Node *) makeSimpleA_Expr(OP, "~~*", $1, $3); } | a_expr ILIKE a_expr ESCAPE a_expr { FuncCall *n = makeNode(FuncCall); @@ -4810,10 +4831,10 @@ a_expr: c_expr n->args = makeList2($3, $5); n->agg_star = FALSE; n->agg_distinct = FALSE; - $$ = makeA_Expr(OP, "~~*", $1, (Node *) n); + $$ = (Node *) makeSimpleA_Expr(OP, "~~*", $1, (Node *) n); } | a_expr NOT ILIKE a_expr - { $$ = makeA_Expr(OP, "!~~*", $1, $4); } + { $$ = (Node *) makeSimpleA_Expr(OP, "!~~*", $1, $4); } | a_expr NOT ILIKE a_expr ESCAPE a_expr { FuncCall *n = makeNode(FuncCall); @@ -4821,7 +4842,7 @@ a_expr: c_expr n->args = makeList2($4, $6); n->agg_star = FALSE; n->agg_distinct = FALSE; - $$ = makeA_Expr(OP, "!~~*", $1, (Node *) n); + $$ = (Node *) makeSimpleA_Expr(OP, "!~~*", $1, (Node *) n); } /* NullTest clause * Define SQL92-style Null test clause. @@ -4915,15 +4936,15 @@ a_expr: c_expr } | a_expr BETWEEN b_expr AND b_expr %prec BETWEEN { - $$ = makeA_Expr(AND, NULL, - makeA_Expr(OP, ">=", $1, $3), - makeA_Expr(OP, "<=", $1, $5)); + $$ = (Node *) makeA_Expr(AND, NIL, + (Node *) makeSimpleA_Expr(OP, ">=", $1, $3), + (Node *) makeSimpleA_Expr(OP, "<=", $1, $5)); } | a_expr NOT BETWEEN b_expr AND b_expr %prec BETWEEN { - $$ = makeA_Expr(OR, NULL, - makeA_Expr(OP, "<", $1, $4), - makeA_Expr(OP, ">", $1, $6)); + $$ = (Node *) makeA_Expr(OR, NIL, + (Node *) makeSimpleA_Expr(OP, "<", $1, $4), + (Node *) makeSimpleA_Expr(OP, ">", $1, $6)); } | a_expr IN in_expr { @@ -4932,7 +4953,8 @@ a_expr: c_expr { SubLink *n = (SubLink *)$3; n->lefthand = makeList1($1); - n->oper = (List *) makeA_Expr(OP, "=", NULL, NULL); + n->oper = (List *) makeSimpleA_Expr(OP, "=", + NULL, NULL); n->useor = FALSE; n->subLinkType = ANY_SUBLINK; $$ = (Node *)n; @@ -4943,11 +4965,13 @@ a_expr: c_expr List *l; foreach(l, (List *) $3) { - Node *cmp = makeA_Expr(OP, "=", $1, lfirst(l)); + Node *cmp; + cmp = (Node *) makeSimpleA_Expr(OP, "=", + $1, lfirst(l)); if (n == NULL) n = cmp; else - n = makeA_Expr(OR, NULL, n, cmp); + n = (Node *) makeA_Expr(OR, NIL, n, cmp); } $$ = n; } @@ -4959,7 +4983,8 @@ a_expr: c_expr { SubLink *n = (SubLink *)$4; n->lefthand = makeList1($1); - n->oper = (List *) makeA_Expr(OP, "<>", NULL, NULL); + n->oper = (List *) makeSimpleA_Expr(OP, "<>", + NULL, NULL); n->useor = FALSE; n->subLinkType = ALL_SUBLINK; $$ = (Node *)n; @@ -4970,16 +4995,18 @@ a_expr: c_expr List *l; foreach(l, (List *) $4) { - Node *cmp = makeA_Expr(OP, "<>", $1, lfirst(l)); + Node *cmp; + cmp = (Node *) makeSimpleA_Expr(OP, "<>", + $1, lfirst(l)); if (n == NULL) n = cmp; else - n = makeA_Expr(AND, NULL, n, cmp); + n = (Node *) makeA_Expr(AND, NIL, n, cmp); } $$ = n; } } - | a_expr all_Op sub_type select_with_parens %prec Op + | a_expr qual_all_Op sub_type select_with_parens %prec Op { SubLink *n = makeNode(SubLink); n->lefthand = makeList1($1); @@ -5007,42 +5034,42 @@ b_expr: c_expr | b_expr TYPECAST Typename { $$ = makeTypeCast($1, $3); } | '+' b_expr %prec UMINUS - { $$ = makeA_Expr(OP, "+", NULL, $2); } + { $$ = (Node *) makeSimpleA_Expr(OP, "+", NULL, $2); } | '-' b_expr %prec UMINUS { $$ = doNegate($2); } | '%' b_expr - { $$ = makeA_Expr(OP, "%", NULL, $2); } + { $$ = (Node *) makeSimpleA_Expr(OP, "%", NULL, $2); } | '^' b_expr - { $$ = makeA_Expr(OP, "^", NULL, $2); } + { $$ = (Node *) makeSimpleA_Expr(OP, "^", NULL, $2); } | b_expr '%' - { $$ = makeA_Expr(OP, "%", $1, NULL); } + { $$ = (Node *) makeSimpleA_Expr(OP, "%", $1, NULL); } | b_expr '^' - { $$ = makeA_Expr(OP, "^", $1, NULL); } + { $$ = (Node *) makeSimpleA_Expr(OP, "^", $1, NULL); } | b_expr '+' b_expr - { $$ = makeA_Expr(OP, "+", $1, $3); } + { $$ = (Node *) makeSimpleA_Expr(OP, "+", $1, $3); } | b_expr '-' b_expr - { $$ = makeA_Expr(OP, "-", $1, $3); } + { $$ = (Node *) makeSimpleA_Expr(OP, "-", $1, $3); } | b_expr '*' b_expr - { $$ = makeA_Expr(OP, "*", $1, $3); } + { $$ = (Node *) makeSimpleA_Expr(OP, "*", $1, $3); } | b_expr '/' b_expr - { $$ = makeA_Expr(OP, "/", $1, $3); } + { $$ = (Node *) makeSimpleA_Expr(OP, "/", $1, $3); } | b_expr '%' b_expr - { $$ = makeA_Expr(OP, "%", $1, $3); } + { $$ = (Node *) makeSimpleA_Expr(OP, "%", $1, $3); } | b_expr '^' b_expr - { $$ = makeA_Expr(OP, "^", $1, $3); } + { $$ = (Node *) makeSimpleA_Expr(OP, "^", $1, $3); } | b_expr '<' b_expr - { $$ = makeA_Expr(OP, "<", $1, $3); } + { $$ = (Node *) makeSimpleA_Expr(OP, "<", $1, $3); } | b_expr '>' b_expr - { $$ = makeA_Expr(OP, ">", $1, $3); } + { $$ = (Node *) makeSimpleA_Expr(OP, ">", $1, $3); } | b_expr '=' b_expr - { $$ = makeA_Expr(OP, "=", $1, $3); } + { $$ = (Node *) makeSimpleA_Expr(OP, "=", $1, $3); } - | b_expr Op b_expr - { $$ = makeA_Expr(OP, $2, $1, $3); } - | Op b_expr - { $$ = makeA_Expr(OP, $1, NULL, $2); } - | b_expr Op %prec POSTFIXOP - { $$ = makeA_Expr(OP, $2, $1, NULL); } + | b_expr qual_Op b_expr %prec Op + { $$ = (Node *) makeA_Expr(OP, $2, $1, $3); } + | qual_Op b_expr %prec Op + { $$ = (Node *) makeA_Expr(OP, $1, NULL, $2); } + | b_expr qual_Op %prec POSTFIXOP + { $$ = (Node *) makeA_Expr(OP, $2, $1, NULL); } ; /* @@ -5539,12 +5566,9 @@ case_expr: CASE case_arg when_clause_list case_default END_TRANS { CaseExpr *c = makeNode(CaseExpr); CaseWhen *w = makeNode(CaseWhen); -/* - A_Const *n = makeNode(A_Const); - n->val.type = T_Null; - w->result = (Node *)n; -*/ - w->expr = makeA_Expr(OP, "=", $3, $5); + + w->expr = (Node *) makeSimpleA_Expr(OP, "=", $3, $5); + /* w->result is left NULL */ c->args = makeList1(w); c->defresult = $3; $$ = (Node *)c; @@ -6243,17 +6267,6 @@ SpecialRuleRelation: OLD %% -static Node * -makeA_Expr(int oper, char *opname, Node *lexpr, Node *rexpr) -{ - A_Expr *a = makeNode(A_Expr); - a->oper = oper; - a->opname = opname; - a->lexpr = lexpr; - a->rexpr = rexpr; - return (Node *)a; -} - static Node * makeTypeCast(Node *arg, TypeName *typename) { @@ -6308,41 +6321,49 @@ makeFloatConst(char *str) * - thomas 1997-12-22 */ static Node * -makeRowExpr(char *opr, List *largs, List *rargs) +makeRowExpr(List *opr, List *largs, List *rargs) { Node *expr = NULL; Node *larg, *rarg; + char *oprname; if (length(largs) != length(rargs)) - elog(ERROR,"Unequal number of entries in row expression"); + elog(ERROR, "Unequal number of entries in row expression"); if (lnext(largs) != NIL) - expr = makeRowExpr(opr,lnext(largs),lnext(rargs)); + expr = makeRowExpr(opr, lnext(largs), lnext(rargs)); larg = lfirst(largs); rarg = lfirst(rargs); - if ((strcmp(opr, "=") == 0) - || (strcmp(opr, "<") == 0) - || (strcmp(opr, "<=") == 0) - || (strcmp(opr, ">") == 0) - || (strcmp(opr, ">=") == 0)) + oprname = strVal(llast(opr)); + + if ((strcmp(oprname, "=") == 0) || + (strcmp(oprname, "<") == 0) || + (strcmp(oprname, "<=") == 0) || + (strcmp(oprname, ">") == 0) || + (strcmp(oprname, ">=") == 0)) { if (expr == NULL) - expr = makeA_Expr(OP, opr, larg, rarg); + expr = (Node *) makeA_Expr(OP, opr, larg, rarg); else - expr = makeA_Expr(AND, NULL, expr, makeA_Expr(OP, opr, larg, rarg)); + expr = (Node *) makeA_Expr(AND, NIL, expr, + (Node *) makeA_Expr(OP, opr, + larg, rarg)); } - else if (strcmp(opr, "<>") == 0) + else if (strcmp(oprname, "<>") == 0) { if (expr == NULL) - expr = makeA_Expr(OP, opr, larg, rarg); + expr = (Node *) makeA_Expr(OP, opr, larg, rarg); else - expr = makeA_Expr(OR, NULL, expr, makeA_Expr(OP, opr, larg, rarg)); + expr = (Node *) makeA_Expr(OR, NIL, expr, + (Node *) makeA_Expr(OP, opr, + larg, rarg)); } else { - elog(ERROR,"Operator '%s' not implemented for row expressions",opr); + elog(ERROR, "Operator '%s' not implemented for row expressions", + oprname); } return expr; @@ -6557,7 +6578,7 @@ doNegate(Node *n) } } - return makeA_Expr(OP, "-", NULL, n); + return (Node *) makeSimpleA_Expr(OP, "-", NULL, n); } static void diff --git a/src/backend/parser/parse_clause.c b/src/backend/parser/parse_clause.c index 4177e7887e1..452f66284d8 100644 --- a/src/backend/parser/parse_clause.c +++ b/src/backend/parser/parse_clause.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.88 2002/04/15 06:05:49 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.89 2002/04/16 23:08:11 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -54,7 +54,7 @@ static Node *transformFromClauseItem(ParseState *pstate, Node *n, static TargetEntry *findTargetlistEntry(ParseState *pstate, Node *node, List *tlist, int clause); static List *addTargetToSortList(TargetEntry *tle, List *sortlist, - List *targetlist, char *opname); + List *targetlist, List *opname); static bool exprIsInSortList(Node *expr, List *sortList, List *targetList); @@ -257,22 +257,15 @@ transformJoinUsingClause(ParseState *pstate, List *leftVars, List *rightVars) Node *rvar = (Node *) lfirst(rvars); A_Expr *e; - e = makeNode(A_Expr); - e->oper = OP; - e->opname = "="; - e->lexpr = copyObject(lvar); - e->rexpr = copyObject(rvar); + e = makeSimpleA_Expr(OP, "=", copyObject(lvar), copyObject(rvar)); if (result == NULL) result = (Node *) e; else { - A_Expr *a = makeNode(A_Expr); + A_Expr *a; - a->oper = AND; - a->opname = NULL; - a->lexpr = result; - a->rexpr = (Node *) e; + a = makeA_Expr(AND, NIL, result, (Node *) e); result = (Node *) a; } @@ -1117,7 +1110,7 @@ transformDistinctClause(ParseState *pstate, List *distinctlist, else { *sortClause = addTargetToSortList(tle, *sortClause, - targetlist, NULL); + targetlist, NIL); /* * Probably, the tle should always have been added at the @@ -1160,7 +1153,7 @@ addAllTargetsToSortList(List *sortlist, List *targetlist) TargetEntry *tle = (TargetEntry *) lfirst(i); if (!tle->resdom->resjunk) - sortlist = addTargetToSortList(tle, sortlist, targetlist, NULL); + sortlist = addTargetToSortList(tle, sortlist, targetlist, NIL); } return sortlist; } @@ -1169,13 +1162,13 @@ addAllTargetsToSortList(List *sortlist, List *targetlist) * addTargetToSortList * If the given targetlist entry isn't already in the ORDER BY list, * add it to the end of the list, using the sortop with given name - * or any available sort operator if opname == NULL. + * or any available sort operator if opname == NIL. * * Returns the updated ORDER BY list. */ static List * addTargetToSortList(TargetEntry *tle, List *sortlist, List *targetlist, - char *opname) + List *opname) { /* avoid making duplicate sortlist entries */ if (!exprIsInSortList(tle->expr, sortlist, targetlist)) diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c index 916c1da4a68..a3525487485 100644 --- a/src/backend/parser/parse_expr.c +++ b/src/backend/parser/parse_expr.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.114 2002/04/11 20:00:00 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.115 2002/04/16 23:08:11 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -192,7 +192,8 @@ transformExpr(ParseState *pstate, Node *expr) * into IS NULL exprs. */ if (Transform_null_equals && - strcmp(a->opname, "=") == 0 && + length(a->name) == 1 && + strcmp(strVal(lfirst(a->name)), "=") == 0 && (exprIsNullConstant(a->lexpr) || exprIsNullConstant(a->rexpr))) { @@ -215,7 +216,7 @@ transformExpr(ParseState *pstate, Node *expr) Node *rexpr = transformExpr(pstate, a->rexpr); - result = (Node *) make_op(a->opname, + result = (Node *) make_op(a->name, lexpr, rexpr); } @@ -366,21 +367,23 @@ transformExpr(ParseState *pstate, Node *expr) /* ALL, ANY, or MULTIEXPR: generate operator list */ List *left_list = sublink->lefthand; List *right_list = qtree->targetList; - char *op; + List *op; + char *opname; List *elist; foreach(elist, left_list) lfirst(elist) = transformExpr(pstate, lfirst(elist)); Assert(IsA(sublink->oper, A_Expr)); - op = ((A_Expr *) sublink->oper)->opname; + op = ((A_Expr *) sublink->oper)->name; + opname = strVal(llast(op)); sublink->oper = NIL; /* Combining operators other than =/<> is dubious... */ if (length(left_list) != 1 && - strcmp(op, "=") != 0 && strcmp(op, "<>") != 0) + strcmp(opname, "=") != 0 && strcmp(opname, "<>") != 0) elog(ERROR, "Row comparison cannot use '%s'", - op); + opname); /* * Scan subquery's targetlist to find values that will @@ -420,7 +423,7 @@ transformExpr(ParseState *pstate, Node *expr) if (opform->oprresult != BOOLOID) elog(ERROR, "'%s' result type of '%s' must return '%s'" " to be used with quantified predicate subquery", - op, typeidTypeName(opform->oprresult), + opname, typeidTypeName(opform->oprresult), typeidTypeName(BOOLOID)); newop = makeOper(oprid(optup), /* opno */ @@ -459,13 +462,8 @@ transformExpr(ParseState *pstate, Node *expr) if (c->arg != NULL) { /* shorthand form was specified, so expand... */ - A_Expr *a = makeNode(A_Expr); - - a->oper = OP; - a->opname = "="; - a->lexpr = c->arg; - a->rexpr = warg; - warg = (Node *) a; + warg = (Node *) makeSimpleA_Expr(OP, "=", + c->arg, warg); } neww->expr = transformExpr(pstate, warg); diff --git a/src/backend/parser/parse_node.c b/src/backend/parser/parse_node.c index 0868f3f0bb8..8a3dc4d5573 100644 --- a/src/backend/parser/parse_node.c +++ b/src/backend/parser/parse_node.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.61 2002/04/11 20:00:01 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.62 2002/04/16 23:08:11 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -62,10 +62,7 @@ make_parsestate(ParseState *parentParseState) * Ensure argument type match by forcing conversion of constants. */ Node * -make_operand(char *opname, - Node *tree, - Oid orig_typeId, - Oid target_typeId) +make_operand(Node *tree, Oid orig_typeId, Oid target_typeId) { Node *result; @@ -95,7 +92,7 @@ make_operand(char *opname, * This is where some type conversion happens. */ Expr * -make_op(char *opname, Node *ltree, Node *rtree) +make_op(List *opname, Node *ltree, Node *rtree) { Oid ltypeId, rtypeId; @@ -114,7 +111,7 @@ make_op(char *opname, Node *ltree, Node *rtree) { tup = right_oper(opname, ltypeId); opform = (Form_pg_operator) GETSTRUCT(tup); - left = make_operand(opname, ltree, ltypeId, opform->oprleft); + left = make_operand(ltree, ltypeId, opform->oprleft); right = NULL; } @@ -123,7 +120,7 @@ make_op(char *opname, Node *ltree, Node *rtree) { tup = left_oper(opname, rtypeId); opform = (Form_pg_operator) GETSTRUCT(tup); - right = make_operand(opname, rtree, rtypeId, opform->oprright); + right = make_operand(rtree, rtypeId, opform->oprright); left = NULL; } @@ -132,8 +129,8 @@ make_op(char *opname, Node *ltree, Node *rtree) { tup = oper(opname, ltypeId, rtypeId, false); opform = (Form_pg_operator) GETSTRUCT(tup); - left = make_operand(opname, ltree, ltypeId, opform->oprleft); - right = make_operand(opname, rtree, rtypeId, opform->oprright); + left = make_operand(ltree, ltypeId, opform->oprleft); + right = make_operand(rtree, rtypeId, opform->oprright); } newop = makeOper(oprid(tup), /* opno */ diff --git a/src/backend/parser/parse_oper.c b/src/backend/parser/parse_oper.c index 028bfab4319..52ae39cccd5 100644 --- a/src/backend/parser/parse_oper.c +++ b/src/backend/parser/parse_oper.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.54 2002/04/11 20:00:02 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.55 2002/04/16 23:08:11 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -19,6 +19,7 @@ #include "access/heapam.h" #include "catalog/catname.h" #include "catalog/indexing.h" +#include "catalog/namespace.h" #include "catalog/pg_operator.h" #include "parser/parse_coerce.h" #include "parser/parse_func.h" @@ -28,17 +29,106 @@ #include "utils/fmgroids.h" #include "utils/syscache.h" -static Oid *oper_select_candidate(int nargs, Oid *input_typeids, - CandidateList candidates); -static Operator oper_exact(char *op, Oid arg1, Oid arg2); -static Operator oper_inexact(char *op, Oid arg1, Oid arg2); -static int binary_oper_get_candidates(char *opname, - CandidateList *candidates); -static int unary_oper_get_candidates(char *opname, - CandidateList *candidates, - char rightleft); -static void op_error(char *op, Oid arg1, Oid arg2); -static void unary_op_error(char *op, Oid arg, bool is_left_op); +static Oid binary_oper_exact(Oid arg1, Oid arg2, + FuncCandidateList candidates); +static Oid oper_select_candidate(int nargs, Oid *input_typeids, + FuncCandidateList candidates); +static void op_error(List *op, Oid arg1, Oid arg2); +static void unary_op_error(List *op, Oid arg, bool is_left_op); + + +/* + * LookupOperName + * Given a possibly-qualified operator name and exact input datatypes, + * look up the operator. Returns InvalidOid if no such operator. + * + * Pass oprleft = InvalidOid for a prefix op, oprright = InvalidOid for + * a postfix op. + * + * If the operator name is not schema-qualified, it is sought in the current + * namespace search path. + */ +Oid +LookupOperName(List *opername, Oid oprleft, Oid oprright) +{ + FuncCandidateList clist; + char oprkind; + + if (!OidIsValid(oprleft)) + oprkind = 'l'; + else if (!OidIsValid(oprright)) + oprkind = 'r'; + else + oprkind = 'b'; + + clist = OpernameGetCandidates(opername, oprkind); + + while (clist) + { + if (clist->args[0] == oprleft && clist->args[1] == oprright) + return clist->oid; + clist = clist->next; + } + + return InvalidOid; +} + +/* + * LookupOperNameTypeNames + * Like LookupOperName, but the argument types are specified by + * TypeName nodes. Also, if we fail to find the operator + * and caller is not NULL, then an error is reported. + * + * Pass oprleft = NULL for a prefix op, oprright = NULL for a postfix op. + */ +Oid +LookupOperNameTypeNames(List *opername, TypeName *oprleft, + TypeName *oprright, const char *caller) +{ + Oid operoid; + Oid leftoid, + rightoid; + + if (oprleft == NULL) + leftoid = InvalidOid; + else + { + leftoid = LookupTypeName(oprleft); + if (!OidIsValid(leftoid)) + elog(ERROR, "Type \"%s\" does not exist", + TypeNameToString(oprleft)); + } + if (oprright == NULL) + rightoid = InvalidOid; + else + { + rightoid = LookupTypeName(oprright); + if (!OidIsValid(rightoid)) + elog(ERROR, "Type \"%s\" does not exist", + TypeNameToString(oprright)); + } + + operoid = LookupOperName(opername, leftoid, rightoid); + + if (!OidIsValid(operoid) && caller != NULL) + { + if (oprleft == NULL) + elog(ERROR, "%s: Prefix operator '%s' for type '%s' does not exist", + caller, NameListToString(opername), + TypeNameToString(oprright)); + else if (oprright == NULL) + elog(ERROR, "%s: Postfix operator '%s' for type '%s' does not exist", + caller, NameListToString(opername), + TypeNameToString(oprleft)); + else + elog(ERROR, "%s: Operator '%s' for types '%s' and '%s' does not exist", + caller, NameListToString(opername), + TypeNameToString(oprleft), + TypeNameToString(oprright)); + } + + return operoid; +} /* Select an ordering operator for the given datatype */ @@ -47,7 +137,8 @@ any_ordering_op(Oid argtype) { Oid order_opid; - order_opid = compatible_oper_opid("<", argtype, argtype, true); + order_opid = compatible_oper_opid(makeList1(makeString("<")), + argtype, argtype, true); if (!OidIsValid(order_opid)) elog(ERROR, "Unable to identify an ordering operator '%s' for type '%s'" "\n\tUse an explicit ordering operator or modify the query", @@ -72,116 +163,32 @@ oprfuncid(Operator op) } -/* binary_oper_get_candidates() - * given opname, find all possible input type pairs for which an operator - * named opname exists. - * Build a list of the candidate input types. - * Returns number of candidates found. +/* binary_oper_exact() + * Check for an "exact" match to the specified operand types. + * + * If one operand is an unknown literal, assume it should be taken to be + * the same type as the other operand for this purpose. */ -static int -binary_oper_get_candidates(char *opname, - CandidateList *candidates) +static Oid +binary_oper_exact(Oid arg1, Oid arg2, + FuncCandidateList candidates) { - Relation pg_operator_desc; - SysScanDesc pg_operator_scan; - HeapTuple tup; - int ncandidates = 0; - ScanKeyData opKey[1]; + /* Unspecified type for one of the arguments? then use the other */ + if ((arg1 == UNKNOWNOID) && (arg2 != InvalidOid)) + arg1 = arg2; + else if ((arg2 == UNKNOWNOID) && (arg1 != InvalidOid)) + arg2 = arg1; - *candidates = NULL; - - ScanKeyEntryInitialize(&opKey[0], 0, - Anum_pg_operator_oprname, - F_NAMEEQ, - NameGetDatum(opname)); - - pg_operator_desc = heap_openr(OperatorRelationName, AccessShareLock); - pg_operator_scan = systable_beginscan(pg_operator_desc, - OperatorNameIndex, true, - SnapshotNow, - 1, opKey); - - while (HeapTupleIsValid(tup = systable_getnext(pg_operator_scan))) + while (candidates != NULL) { - Form_pg_operator oper = (Form_pg_operator) GETSTRUCT(tup); - - if (oper->oprkind == 'b') - { - CandidateList current_candidate; - - current_candidate = (CandidateList) palloc(sizeof(struct _CandidateList)); - current_candidate->args = (Oid *) palloc(2 * sizeof(Oid)); - - current_candidate->args[0] = oper->oprleft; - current_candidate->args[1] = oper->oprright; - current_candidate->next = *candidates; - *candidates = current_candidate; - ncandidates++; - } + if (arg1 == candidates->args[0] && + arg2 == candidates->args[1]) + return candidates->oid; + candidates = candidates->next; } - systable_endscan(pg_operator_scan); - heap_close(pg_operator_desc, AccessShareLock); - - return ncandidates; -} /* binary_oper_get_candidates() */ - -/* unary_oper_get_candidates() - * given opname, find all possible types for which - * a right/left unary operator named opname exists. - * Build a list of the candidate input types. - * Returns number of candidates found. - */ -static int -unary_oper_get_candidates(char *opname, - CandidateList *candidates, - char rightleft) -{ - Relation pg_operator_desc; - SysScanDesc pg_operator_scan; - HeapTuple tup; - int ncandidates = 0; - ScanKeyData opKey[1]; - - *candidates = NULL; - - ScanKeyEntryInitialize(&opKey[0], 0, - Anum_pg_operator_oprname, - F_NAMEEQ, - NameGetDatum(opname)); - - pg_operator_desc = heap_openr(OperatorRelationName, AccessShareLock); - pg_operator_scan = systable_beginscan(pg_operator_desc, - OperatorNameIndex, true, - SnapshotNow, - 1, opKey); - - while (HeapTupleIsValid(tup = systable_getnext(pg_operator_scan))) - { - Form_pg_operator oper = (Form_pg_operator) GETSTRUCT(tup); - - if (oper->oprkind == rightleft) - { - CandidateList current_candidate; - - current_candidate = (CandidateList) palloc(sizeof(struct _CandidateList)); - current_candidate->args = (Oid *) palloc(sizeof(Oid)); - - if (rightleft == 'r') - current_candidate->args[0] = oper->oprleft; - else - current_candidate->args[0] = oper->oprright; - current_candidate->next = *candidates; - *candidates = current_candidate; - ncandidates++; - } - } - - systable_endscan(pg_operator_scan); - heap_close(pg_operator_desc, AccessShareLock); - - return ncandidates; -} /* unary_oper_get_candidates() */ + return InvalidOid; +} /* oper_select_candidate() @@ -234,13 +241,13 @@ unary_oper_get_candidates(char *opname, * some sense. (see equivalentOpersAfterPromotion for details.) * - ay 6/95 */ -static Oid * +static Oid oper_select_candidate(int nargs, Oid *input_typeids, - CandidateList candidates) + FuncCandidateList candidates) { - CandidateList current_candidate; - CandidateList last_candidate; + FuncCandidateList current_candidate; + FuncCandidateList last_candidate; Oid *current_typeids; Oid current_type; int unknownOids; @@ -289,9 +296,9 @@ oper_select_candidate(int nargs, /* Done if no candidate or only one candidate survives */ if (ncandidates == 0) - return NULL; + return InvalidOid; if (ncandidates == 1) - return candidates->args; + return candidates->oid; /* * Run through all candidates and keep those with the most matches on @@ -335,7 +342,7 @@ oper_select_candidate(int nargs, last_candidate->next = NULL; if (ncandidates == 1) - return candidates->args; + return candidates->oid; /* * Still too many candidates? Run through all candidates and keep @@ -382,7 +389,7 @@ oper_select_candidate(int nargs, last_candidate->next = NULL; if (ncandidates == 1) - return candidates->args; + return candidates->oid; /* * Still too many candidates? Now look for candidates which are @@ -428,7 +435,7 @@ oper_select_candidate(int nargs, last_candidate->next = NULL; if (ncandidates == 1) - return candidates->args; + return candidates->oid; /* * Still too many candidates? Try assigning types for the unknown @@ -467,7 +474,7 @@ oper_select_candidate(int nargs, nmatch++; } if (nmatch == nargs) - return current_typeids; + return current_candidate->oid; } } @@ -602,87 +609,12 @@ oper_select_candidate(int nargs, } if (ncandidates == 1) - return candidates->args; + return candidates->oid; - return NULL; /* failed to determine a unique candidate */ + return InvalidOid; /* failed to determine a unique candidate */ } /* oper_select_candidate() */ -/* oper_exact() - * Given operator, types of arg1 and arg2, return oper struct or NULL. - * - * NOTE: on success, the returned object is a syscache entry. The caller - * must ReleaseSysCache() the entry when done with it. - */ -static Operator -oper_exact(char *op, Oid arg1, Oid arg2) -{ - HeapTuple tup; - - /* Unspecified type for one of the arguments? then use the other */ - if ((arg1 == UNKNOWNOID) && (arg2 != InvalidOid)) - arg1 = arg2; - else if ((arg2 == UNKNOWNOID) && (arg1 != InvalidOid)) - arg2 = arg1; - - tup = SearchSysCache(OPERNAME, - PointerGetDatum(op), - ObjectIdGetDatum(arg1), - ObjectIdGetDatum(arg2), - CharGetDatum('b')); - - return (Operator) tup; -} - - -/* oper_inexact() - * Given operator, types of arg1 and arg2, return oper struct or NULL. - * - * NOTE: on success, the returned object is a syscache entry. The caller - * must ReleaseSysCache() the entry when done with it. - */ -static Operator -oper_inexact(char *op, Oid arg1, Oid arg2) -{ - HeapTuple tup; - CandidateList candidates; - int ncandidates; - Oid *targetOids; - Oid inputOids[2]; - - /* Unspecified type for one of the arguments? then use the other */ - if (arg2 == InvalidOid) - arg2 = arg1; - if (arg1 == InvalidOid) - arg1 = arg2; - - ncandidates = binary_oper_get_candidates(op, &candidates); - - /* No operators found? Then return null... */ - if (ncandidates == 0) - return NULL; - - /* - * Otherwise, check for compatible datatypes, and then try to resolve - * the conflict if more than one candidate remains. - */ - inputOids[0] = arg1; - inputOids[1] = arg2; - targetOids = oper_select_candidate(2, inputOids, candidates); - if (targetOids != NULL) - { - tup = SearchSysCache(OPERNAME, - PointerGetDatum(op), - ObjectIdGetDatum(targetOids[0]), - ObjectIdGetDatum(targetOids[1]), - CharGetDatum('b')); - } - else - tup = NULL; - return (Operator) tup; -} - - /* oper() -- search for a binary operator * Given operator name, types of arg1 and arg2, return oper struct. * @@ -697,22 +629,48 @@ oper_inexact(char *op, Oid arg1, Oid arg2) * must ReleaseSysCache() the entry when done with it. */ Operator -oper(char *opname, Oid ltypeId, Oid rtypeId, bool noError) +oper(List *opname, Oid ltypeId, Oid rtypeId, bool noError) { - HeapTuple tup; + FuncCandidateList clist; + Oid operOid; + Oid inputOids[2]; + HeapTuple tup = NULL; - /* check for exact match on this operator... */ - if (HeapTupleIsValid(tup = oper_exact(opname, ltypeId, rtypeId))) - return (Operator) tup; + /* Get binary operators of given name */ + clist = OpernameGetCandidates(opname, 'b'); - /* try to find a match on likely candidates... */ - if (HeapTupleIsValid(tup = oper_inexact(opname, ltypeId, rtypeId))) - return (Operator) tup; + /* No operators found? Then fail... */ + if (clist != NULL) + { + /* + * Check for an "exact" match. + */ + operOid = binary_oper_exact(ltypeId, rtypeId, clist); + if (!OidIsValid(operOid)) + { + /* + * Otherwise, search for the most suitable candidate. + */ - if (!noError) + /* Unspecified type for one of the arguments? then use the other */ + if (rtypeId == InvalidOid) + rtypeId = ltypeId; + else if (ltypeId == InvalidOid) + ltypeId = rtypeId; + inputOids[0] = ltypeId; + inputOids[1] = rtypeId; + operOid = oper_select_candidate(2, inputOids, clist); + } + if (OidIsValid(operOid)) + tup = SearchSysCache(OPEROID, + ObjectIdGetDatum(operOid), + 0, 0, 0); + } + + if (!HeapTupleIsValid(tup) && !noError) op_error(opname, ltypeId, rtypeId); - return (Operator) NULL; + return (Operator) tup; } /* compatible_oper() @@ -723,7 +681,7 @@ oper(char *opname, Oid ltypeId, Oid rtypeId, bool noError) * are accepted). Otherwise, the semantics are the same. */ Operator -compatible_oper(char *op, Oid arg1, Oid arg2, bool noError) +compatible_oper(List *op, Oid arg1, Oid arg2, bool noError) { Operator optup; Form_pg_operator opform; @@ -755,7 +713,7 @@ compatible_oper(char *op, Oid arg1, Oid arg2, bool noError) * lookup fails and noError is true. */ Oid -compatible_oper_opid(char *op, Oid arg1, Oid arg2, bool noError) +compatible_oper_opid(List *op, Oid arg1, Oid arg2, bool noError) { Operator optup; Oid result; @@ -777,7 +735,7 @@ compatible_oper_opid(char *op, Oid arg1, Oid arg2, bool noError) * lookup fails and noError is true. */ Oid -compatible_oper_funcid(char *op, Oid arg1, Oid arg2, bool noError) +compatible_oper_funcid(List *op, Oid arg1, Oid arg2, bool noError) { Operator optup; Oid result; @@ -805,46 +763,50 @@ compatible_oper_funcid(char *op, Oid arg1, Oid arg2, bool noError) * must ReleaseSysCache() the entry when done with it. */ Operator -right_oper(char *op, Oid arg) +right_oper(List *op, Oid arg) { - HeapTuple tup; - CandidateList candidates; - int ncandidates; - Oid *targetOid; + FuncCandidateList clist; + Oid operOid = InvalidOid; + HeapTuple tup = NULL; - /* Try for exact match */ - tup = SearchSysCache(OPERNAME, - PointerGetDatum(op), - ObjectIdGetDatum(arg), - ObjectIdGetDatum(InvalidOid), - CharGetDatum('r')); + /* Find candidates */ + clist = OpernameGetCandidates(op, 'r'); - if (!HeapTupleIsValid(tup)) + if (clist != NULL) { - /* Try for inexact matches */ - ncandidates = unary_oper_get_candidates(op, &candidates, 'r'); - if (ncandidates == 0) - unary_op_error(op, arg, FALSE); - else + /* + * First, quickly check to see if there is an exactly matching + * operator (there can be only one such entry in the list). + */ + FuncCandidateList clisti; + + for (clisti = clist; clisti != NULL; clisti = clisti->next) + { + if (arg == clisti->args[0]) + { + operOid = clisti->oid; + break; + } + } + + if (!OidIsValid(operOid)) { /* * We must run oper_select_candidate even if only one * candidate, otherwise we may falsely return a * non-type-compatible operator. */ - targetOid = oper_select_candidate(1, &arg, candidates); - if (targetOid != NULL) - tup = SearchSysCache(OPERNAME, - PointerGetDatum(op), - ObjectIdGetDatum(targetOid[0]), - ObjectIdGetDatum(InvalidOid), - CharGetDatum('r')); + operOid = oper_select_candidate(1, &arg, clist); } - - if (!HeapTupleIsValid(tup)) - unary_op_error(op, arg, FALSE); + if (OidIsValid(operOid)) + tup = SearchSysCache(OPEROID, + ObjectIdGetDatum(operOid), + 0, 0, 0); } + if (!HeapTupleIsValid(tup)) + unary_op_error(op, arg, FALSE); + return (Operator) tup; } /* right_oper() */ @@ -861,46 +823,55 @@ right_oper(char *op, Oid arg) * must ReleaseSysCache() the entry when done with it. */ Operator -left_oper(char *op, Oid arg) +left_oper(List *op, Oid arg) { - HeapTuple tup; - CandidateList candidates; - int ncandidates; - Oid *targetOid; + FuncCandidateList clist; + Oid operOid = InvalidOid; + HeapTuple tup = NULL; - /* Try for exact match */ - tup = SearchSysCache(OPERNAME, - PointerGetDatum(op), - ObjectIdGetDatum(InvalidOid), - ObjectIdGetDatum(arg), - CharGetDatum('l')); + /* Find candidates */ + clist = OpernameGetCandidates(op, 'l'); - if (!HeapTupleIsValid(tup)) + if (clist != NULL) { - /* Try for inexact matches */ - ncandidates = unary_oper_get_candidates(op, &candidates, 'l'); - if (ncandidates == 0) - unary_op_error(op, arg, TRUE); - else + /* + * First, quickly check to see if there is an exactly matching + * operator (there can be only one such entry in the list). + * + * The returned list has args in the form (0, oprright). Move the + * useful data into args[0] to keep oper_select_candidate simple. + * XXX we are assuming here that we may scribble on the list! + */ + FuncCandidateList clisti; + + for (clisti = clist; clisti != NULL; clisti = clisti->next) + { + clisti->args[0] = clisti->args[1]; + if (arg == clisti->args[0]) + { + operOid = clisti->oid; + break; + } + } + + if (!OidIsValid(operOid)) { /* * We must run oper_select_candidate even if only one * candidate, otherwise we may falsely return a * non-type-compatible operator. */ - targetOid = oper_select_candidate(1, &arg, candidates); - if (targetOid != NULL) - tup = SearchSysCache(OPERNAME, - PointerGetDatum(op), - ObjectIdGetDatum(InvalidOid), - ObjectIdGetDatum(targetOid[0]), - CharGetDatum('l')); + operOid = oper_select_candidate(1, &arg, clist); } - - if (!HeapTupleIsValid(tup)) - unary_op_error(op, arg, TRUE); + if (OidIsValid(operOid)) + tup = SearchSysCache(OPEROID, + ObjectIdGetDatum(operOid), + 0, 0, 0); } + if (!HeapTupleIsValid(tup)) + unary_op_error(op, arg, TRUE); + return (Operator) tup; } /* left_oper() */ @@ -910,19 +881,22 @@ left_oper(char *op, Oid arg) * is not found. */ static void -op_error(char *op, Oid arg1, Oid arg2) +op_error(List *op, Oid arg1, Oid arg2) { if (!typeidIsValid(arg1)) elog(ERROR, "Left hand side of operator '%s' has an unknown type" - "\n\tProbably a bad attribute name", op); + "\n\tProbably a bad attribute name", + NameListToString(op)); if (!typeidIsValid(arg2)) elog(ERROR, "Right hand side of operator %s has an unknown type" - "\n\tProbably a bad attribute name", op); + "\n\tProbably a bad attribute name", + NameListToString(op)); elog(ERROR, "Unable to identify an operator '%s' for types '%s' and '%s'" "\n\tYou will have to retype this query using an explicit cast", - op, format_type_be(arg1), format_type_be(arg2)); + NameListToString(op), + format_type_be(arg1), format_type_be(arg2)); } /* unary_op_error() @@ -930,28 +904,28 @@ op_error(char *op, Oid arg1, Oid arg2) * is not found. */ static void -unary_op_error(char *op, Oid arg, bool is_left_op) +unary_op_error(List *op, Oid arg, bool is_left_op) { if (!typeidIsValid(arg)) { if (is_left_op) elog(ERROR, "operand of prefix operator '%s' has an unknown type" "\n\t(probably an invalid column reference)", - op); + NameListToString(op)); else elog(ERROR, "operand of postfix operator '%s' has an unknown type" "\n\t(probably an invalid column reference)", - op); + NameListToString(op)); } else { if (is_left_op) elog(ERROR, "Unable to identify a prefix operator '%s' for type '%s'" "\n\tYou may need to add parentheses or an explicit cast", - op, format_type_be(arg)); + NameListToString(op), format_type_be(arg)); else elog(ERROR, "Unable to identify a postfix operator '%s' for type '%s'" "\n\tYou may need to add parentheses or an explicit cast", - op, format_type_be(arg)); + NameListToString(op), format_type_be(arg)); } } diff --git a/src/backend/utils/adt/ri_triggers.c b/src/backend/utils/adt/ri_triggers.c index f9accfefc24..e0b465ec983 100644 --- a/src/backend/utils/adt/ri_triggers.c +++ b/src/backend/utils/adt/ri_triggers.c @@ -18,7 +18,7 @@ * Portions Copyright (c) 2000-2001, PostgreSQL Global Development Group * Copyright 1999 Jan Wieck * - * $Header: /cvsroot/pgsql/src/backend/utils/adt/ri_triggers.c,v 1.36 2002/04/02 01:03:07 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/ri_triggers.c,v 1.37 2002/04/16 23:08:11 tgl Exp $ * * ---------- */ @@ -36,6 +36,7 @@ #include "catalog/pg_operator.h" #include "commands/trigger.h" #include "executor/spi_priv.h" +#include "parser/parse_oper.h" #include "utils/lsyscache.h" #include "miscadmin.h" @@ -3338,27 +3339,20 @@ ri_AttributesEqual(Oid typeid, Datum oldvalue, Datum newvalue) HASH_FIND, NULL); /* - * If not found, lookup the OPERNAME system cache for it to get the - * func OID, then do the function manager lookup, and remember that - * info. + * If not found, lookup the operator, then do the function manager + * lookup, and remember that info. */ if (!entry) { - HeapTuple opr_tup; Oid opr_proc; FmgrInfo finfo; - opr_tup = SearchSysCache(OPERNAME, - PointerGetDatum("="), - ObjectIdGetDatum(typeid), - ObjectIdGetDatum(typeid), - CharGetDatum('b')); - if (!HeapTupleIsValid(opr_tup)) + opr_proc = compatible_oper_funcid(makeList1(makeString("=")), + typeid, typeid, true); + if (!OidIsValid(opr_proc)) elog(ERROR, - "ri_AttributesEqual(): cannot find '=' operator for type %u", + "ri_AttributesEqual(): cannot find '=' operator for type %u", typeid); - opr_proc = ((Form_pg_operator) GETSTRUCT(opr_tup))->oprcode; - ReleaseSysCache(opr_tup); /* * Since fmgr_info could fail, call it *before* creating the diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c index e8e71dec25a..3b1af8df5e1 100644 --- a/src/backend/utils/adt/selfuncs.c +++ b/src/backend/utils/adt/selfuncs.c @@ -15,7 +15,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.107 2002/04/03 05:39:31 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.108 2002/04/16 23:08:11 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -74,6 +74,7 @@ #include "access/heapam.h" #include "catalog/catname.h" +#include "catalog/pg_namespace.h" #include "catalog/pg_operator.h" #include "catalog/pg_proc.h" #include "catalog/pg_statistic.h" @@ -3285,14 +3286,15 @@ string_lessthan(const char *str1, const char *str2, Oid datatype) } /* See if there is a binary op of the given name for the given datatype */ +/* NB: we assume that only built-in system operators are searched for */ static Oid find_operator(const char *opname, Oid datatype) { - return GetSysCacheOid(OPERNAME, + return GetSysCacheOid(OPERNAMENSP, PointerGetDatum(opname), ObjectIdGetDatum(datatype), ObjectIdGetDatum(datatype), - CharGetDatum('b')); + ObjectIdGetDatum(PG_CATALOG_NAMESPACE)); } /* diff --git a/src/backend/utils/cache/lsyscache.c b/src/backend/utils/cache/lsyscache.c index 17ea1abdd0c..6699a179d37 100644 --- a/src/backend/utils/cache/lsyscache.c +++ b/src/backend/utils/cache/lsyscache.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.69 2002/04/05 00:31:30 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.70 2002/04/16 23:08:11 tgl Exp $ * * NOTES * Eventually, the index information should go through here, too. @@ -378,10 +378,6 @@ op_mergejoinable(Oid opno, Oid ltype, Oid rtype, Oid *leftOp, Oid *rightOp) * ltype ">" rtype) for an operator previously determined to be * mergejoinable. Optionally, fetches the regproc ids of these * operators, as well as their operator OIDs. - * - * Raises error if operators cannot be found. Assuming that the operator - * had indeed been marked mergejoinable, this indicates that whoever marked - * it so was mistaken. */ void op_mergejoin_crossops(Oid opno, Oid *ltop, Oid *gtop, @@ -389,11 +385,9 @@ op_mergejoin_crossops(Oid opno, Oid *ltop, Oid *gtop, { HeapTuple tp; Form_pg_operator optup; - Oid oprleft, - oprright; /* - * Get the declared left and right operand types of the operator. + * Get the declared comparison operators of the operator. */ tp = SearchSysCache(OPEROID, ObjectIdGetDatum(opno), @@ -401,44 +395,23 @@ op_mergejoin_crossops(Oid opno, Oid *ltop, Oid *gtop, if (!HeapTupleIsValid(tp)) /* shouldn't happen */ elog(ERROR, "op_mergejoin_crossops: operator %u not found", opno); optup = (Form_pg_operator) GETSTRUCT(tp); - oprleft = optup->oprleft; - oprright = optup->oprright; + *ltop = optup->oprltcmpop; + *gtop = optup->oprgtcmpop; ReleaseSysCache(tp); - /* - * Look up the "<" operator with the same input types. If there isn't - * one, whoever marked the "=" operator mergejoinable was a loser. - */ - tp = SearchSysCache(OPERNAME, - PointerGetDatum("<"), - ObjectIdGetDatum(oprleft), - ObjectIdGetDatum(oprright), - CharGetDatum('b')); - if (!HeapTupleIsValid(tp)) + /* Check < op provided */ + if (!OidIsValid(*ltop)) elog(ERROR, "op_mergejoin_crossops: mergejoin operator %u has no matching < operator", opno); - optup = (Form_pg_operator) GETSTRUCT(tp); - *ltop = tp->t_data->t_oid; if (ltproc) - *ltproc = optup->oprcode; - ReleaseSysCache(tp); + *ltproc = get_opcode(*ltop); - /* - * And the same for the ">" operator. - */ - tp = SearchSysCache(OPERNAME, - PointerGetDatum(">"), - ObjectIdGetDatum(oprleft), - ObjectIdGetDatum(oprright), - CharGetDatum('b')); - if (!HeapTupleIsValid(tp)) + /* Check > op provided */ + if (!OidIsValid(*gtop)) elog(ERROR, "op_mergejoin_crossops: mergejoin operator %u has no matching > operator", opno); - optup = (Form_pg_operator) GETSTRUCT(tp); - *gtop = tp->t_data->t_oid; if (gtproc) - *gtproc = optup->oprcode; - ReleaseSysCache(tp); + *gtproc = get_opcode(*gtop); } /* diff --git a/src/backend/utils/cache/syscache.c b/src/backend/utils/cache/syscache.c index 6808c07f4be..720d19225c6 100644 --- a/src/backend/utils/cache/syscache.c +++ b/src/backend/utils/cache/syscache.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.76 2002/04/11 20:00:06 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.77 2002/04/16 23:08:11 tgl Exp $ * * NOTES * These routines allow the parser/planner/executor to perform @@ -273,15 +273,15 @@ static const struct cachedesc cacheinfo[] = { 0, 0 }}, - {OperatorRelationName, /* OPERNAME */ - OperatorNameIndex, + {OperatorRelationName, /* OPERNAMENSP */ + OperatorNameNspIndex, 0, 4, { Anum_pg_operator_oprname, Anum_pg_operator_oprleft, Anum_pg_operator_oprright, - Anum_pg_operator_oprkind + Anum_pg_operator_oprnamespace }}, {OperatorRelationName, /* OPEROID */ OperatorOidIndex, diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h index 1ef1940ee0f..4b0d011b3d6 100644 --- a/src/include/catalog/catversion.h +++ b/src/include/catalog/catversion.h @@ -37,7 +37,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: catversion.h,v 1.115 2002/04/15 23:45:07 momjian Exp $ + * $Id: catversion.h,v 1.116 2002/04/16 23:08:11 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -53,6 +53,6 @@ */ /* yyyymmddN */ -#define CATALOG_VERSION_NO 200204151 +#define CATALOG_VERSION_NO 200204161 #endif diff --git a/src/include/catalog/indexing.h b/src/include/catalog/indexing.h index 6aa58ec563e..4ca83c54273 100644 --- a/src/include/catalog/indexing.h +++ b/src/include/catalog/indexing.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: indexing.h,v 1.62 2002/04/11 20:00:10 tgl Exp $ + * $Id: indexing.h,v 1.63 2002/04/16 23:08:11 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -74,7 +74,7 @@ #define NamespaceOidIndex "pg_namespace_oid_index" #define OpclassAmNameIndex "pg_opclass_am_name_index" #define OpclassOidIndex "pg_opclass_oid_index" -#define OperatorNameIndex "pg_operator_oprname_l_r_k_index" +#define OperatorNameNspIndex "pg_operator_oprname_l_r_n_index" #define OperatorOidIndex "pg_operator_oid_index" #define ProcedureNameNspIndex "pg_proc_proname_args_nsp_index" #define ProcedureOidIndex "pg_proc_oid_index" @@ -172,7 +172,7 @@ DECLARE_UNIQUE_INDEX(pg_namespace_oid_index on pg_namespace using btree(oid oid_ DECLARE_UNIQUE_INDEX(pg_opclass_am_name_index on pg_opclass using btree(opcamid oid_ops, opcname name_ops)); DECLARE_UNIQUE_INDEX(pg_opclass_oid_index on pg_opclass using btree(oid oid_ops)); DECLARE_UNIQUE_INDEX(pg_operator_oid_index on pg_operator using btree(oid oid_ops)); -DECLARE_UNIQUE_INDEX(pg_operator_oprname_l_r_k_index on pg_operator using btree(oprname name_ops, oprleft oid_ops, oprright oid_ops, oprkind char_ops)); +DECLARE_UNIQUE_INDEX(pg_operator_oprname_l_r_n_index on pg_operator using btree(oprname name_ops, oprleft oid_ops, oprright oid_ops, oprnamespace oid_ops)); DECLARE_UNIQUE_INDEX(pg_proc_oid_index on pg_proc using btree(oid oid_ops)); DECLARE_UNIQUE_INDEX(pg_proc_proname_args_nsp_index on pg_proc using btree(proname name_ops, pronargs int2_ops, proargtypes oidvector_ops, pronamespace oid_ops)); /* This following index is not used for a cache and is not unique */ diff --git a/src/include/catalog/namespace.h b/src/include/catalog/namespace.h index 15a21e77d5d..d69e1da58b7 100644 --- a/src/include/catalog/namespace.h +++ b/src/include/catalog/namespace.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: namespace.h,v 1.7 2002/04/09 20:35:54 tgl Exp $ + * $Id: namespace.h,v 1.8 2002/04/16 23:08:11 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -43,6 +43,8 @@ extern Oid TypenameGetTypid(const char *typname); extern FuncCandidateList FuncnameGetCandidates(List *names, int nargs); +extern FuncCandidateList OpernameGetCandidates(List *names, char oprkind); + extern Oid QualifiedNameGetCreationNamespace(List *names, char **objname_p); extern RangeVar *makeRangeVarFromNameList(List *names); diff --git a/src/include/catalog/pg_operator.h b/src/include/catalog/pg_operator.h index 8fcb3b9ed56..0cd1f5d96f0 100644 --- a/src/include/catalog/pg_operator.h +++ b/src/include/catalog/pg_operator.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: pg_operator.h,v 1.101 2002/04/11 20:00:11 tgl Exp $ + * $Id: pg_operator.h,v 1.102 2002/04/16 23:08:11 tgl Exp $ * * NOTES * the genbki.sh script reads this file and generates .bki @@ -22,6 +22,8 @@ #ifndef PG_OPERATOR_H #define PG_OPERATOR_H +#include "nodes/pg_list.h" + /* ---------------- * postgres.h contains the system type definintions and the * CATALOG(), BOOTSTRAP and DATA() sugar words so this file @@ -36,22 +38,25 @@ */ CATALOG(pg_operator) { - NameData oprname; - int4 oprowner; - int2 oprprec; - char oprkind; - bool oprisleft; - bool oprcanhash; - Oid oprleft; - Oid oprright; - Oid oprresult; - Oid oprcom; - Oid oprnegate; - Oid oprlsortop; - Oid oprrsortop; - regproc oprcode; - regproc oprrest; - regproc oprjoin; + NameData oprname; /* name of operator */ + Oid oprnamespace; /* OID of namespace containing this oper */ + int4 oprowner; /* oper owner */ + int2 oprprec; /* precedence (not currently used) */ + char oprkind; /* 'l', 'r', or 'b' */ + bool oprisleft; /* left associative (not currently used) */ + bool oprcanhash; /* can be used in hash join? */ + Oid oprleft; /* left arg type, or 0 if 'l' oprkind */ + Oid oprright; /* right arg type, or 0 if 'r' oprkind */ + Oid oprresult; /* result datatype */ + Oid oprcom; /* OID of commutator oper, or 0 if none */ + Oid oprnegate; /* OID of negator oper, or 0 if none */ + Oid oprlsortop; /* OID of left sortop, if mergejoinable */ + Oid oprrsortop; /* OID of right sortop, if mergejoinable */ + Oid oprltcmpop; /* OID of "lr" oper, if mergejoinable */ + regproc oprcode; /* OID of underlying function */ + regproc oprrest; /* OID of restriction estimator, or 0 */ + regproc oprjoin; /* OID of join estimator, or 0 */ } FormData_pg_operator; /* ---------------- @@ -66,795 +71,799 @@ typedef FormData_pg_operator *Form_pg_operator; * ---------------- */ -#define Natts_pg_operator 16 +#define Natts_pg_operator 19 #define Anum_pg_operator_oprname 1 -#define Anum_pg_operator_oprowner 2 -#define Anum_pg_operator_oprprec 3 -#define Anum_pg_operator_oprkind 4 -#define Anum_pg_operator_oprisleft 5 -#define Anum_pg_operator_oprcanhash 6 -#define Anum_pg_operator_oprleft 7 -#define Anum_pg_operator_oprright 8 -#define Anum_pg_operator_oprresult 9 -#define Anum_pg_operator_oprcom 10 -#define Anum_pg_operator_oprnegate 11 -#define Anum_pg_operator_oprlsortop 12 -#define Anum_pg_operator_oprrsortop 13 -#define Anum_pg_operator_oprcode 14 -#define Anum_pg_operator_oprrest 15 -#define Anum_pg_operator_oprjoin 16 +#define Anum_pg_operator_oprnamespace 2 +#define Anum_pg_operator_oprowner 3 +#define Anum_pg_operator_oprprec 4 +#define Anum_pg_operator_oprkind 5 +#define Anum_pg_operator_oprisleft 6 +#define Anum_pg_operator_oprcanhash 7 +#define Anum_pg_operator_oprleft 8 +#define Anum_pg_operator_oprright 9 +#define Anum_pg_operator_oprresult 10 +#define Anum_pg_operator_oprcom 11 +#define Anum_pg_operator_oprnegate 12 +#define Anum_pg_operator_oprlsortop 13 +#define Anum_pg_operator_oprrsortop 14 +#define Anum_pg_operator_oprltcmpop 15 +#define Anum_pg_operator_oprgtcmpop 16 +#define Anum_pg_operator_oprcode 17 +#define Anum_pg_operator_oprrest 18 +#define Anum_pg_operator_oprjoin 19 /* ---------------- * initial contents of 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 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 = 15 ( "=" PGNSP PGUID 0 b t f 23 20 16 416 36 97 412 37 76 int48eq eqsel eqjoinsel )); +DATA(insert OID = 36 ( "<>" PGNSP PGUID 0 b t f 23 20 16 417 15 0 0 0 0 int48ne neqsel neqjoinsel )); +DATA(insert OID = 37 ( "<" PGNSP PGUID 0 b t f 23 20 16 419 82 0 0 0 0 int48lt scalarltsel scalarltjoinsel )); +DATA(insert OID = 76 ( ">" PGNSP PGUID 0 b t f 23 20 16 418 80 0 0 0 0 int48gt scalargtsel scalargtjoinsel )); +DATA(insert OID = 80 ( "<=" PGNSP PGUID 0 b t f 23 20 16 430 76 0 0 0 0 int48le scalarltsel scalarltjoinsel )); +DATA(insert OID = 82 ( ">=" PGNSP PGUID 0 b t f 23 20 16 420 37 0 0 0 0 int48ge scalargtsel scalargtjoinsel )); -DATA(insert OID = 58 ( "<" PGUID 0 b t f 16 16 16 59 1695 0 0 boollt scalarltsel scalarltjoinsel )); -DATA(insert OID = 59 ( ">" PGUID 0 b t f 16 16 16 58 1694 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 )); +DATA(insert OID = 58 ( "<" PGNSP PGUID 0 b t f 16 16 16 59 1695 0 0 0 0 boollt scalarltsel scalarltjoinsel )); +DATA(insert OID = 59 ( ">" PGNSP PGUID 0 b t f 16 16 16 58 1694 0 0 0 0 boolgt scalargtsel scalargtjoinsel )); +DATA(insert OID = 85 ( "<>" PGNSP PGUID 0 b t f 16 16 16 85 91 0 0 0 0 boolne neqsel neqjoinsel )); +DATA(insert OID = 91 ( "=" PGNSP PGUID 0 b t t 16 16 16 91 85 58 58 58 59 booleq eqsel eqjoinsel )); #define BooleanEqualOperator 91 -DATA(insert OID = 1694 ( "<=" PGUID 0 b t f 16 16 16 1695 59 0 0 boolle scalarltsel scalarltjoinsel )); -DATA(insert OID = 1695 ( ">=" PGUID 0 b t f 16 16 16 1694 58 0 0 boolge scalargtsel scalargtjoinsel )); +DATA(insert OID = 1694 ( "<=" PGNSP PGUID 0 b t f 16 16 16 1695 59 0 0 0 0 boolle scalarltsel scalarltjoinsel )); +DATA(insert OID = 1695 ( ">=" PGNSP PGUID 0 b t f 16 16 16 1694 58 0 0 0 0 boolge scalargtsel scalargtjoinsel )); -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 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 scalarltsel scalarltjoinsel )); -DATA(insert OID = 98 ( "=" PGUID 0 b t t 25 25 16 98 531 664 664 texteq eqsel eqjoinsel )); +DATA(insert OID = 92 ( "=" PGNSP PGUID 0 b t t 18 18 16 92 630 631 631 631 633 chareq eqsel eqjoinsel )); +DATA(insert OID = 93 ( "=" PGNSP PGUID 0 b t t 19 19 16 93 643 660 660 660 662 nameeq eqsel eqjoinsel )); +DATA(insert OID = 94 ( "=" PGNSP PGUID 0 b t t 21 21 16 94 519 95 95 95 520 int2eq eqsel eqjoinsel )); +DATA(insert OID = 95 ( "<" PGNSP PGUID 0 b t f 21 21 16 520 524 0 0 0 0 int2lt scalarltsel scalarltjoinsel )); +DATA(insert OID = 96 ( "=" PGNSP PGUID 0 b t t 23 23 16 96 518 97 97 97 521 int4eq eqsel eqjoinsel )); +DATA(insert OID = 97 ( "<" PGNSP PGUID 0 b t f 23 23 16 521 525 0 0 0 0 int4lt scalarltsel scalarltjoinsel )); +DATA(insert OID = 98 ( "=" PGNSP PGUID 0 b t t 25 25 16 98 531 664 664 664 666 texteq eqsel eqjoinsel )); -DATA(insert OID = 329 ( "=" PGUID 0 b t f 1000 1000 16 329 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 349 ( "=" PGUID 0 b t f 1001 1001 16 349 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 374 ( "=" PGUID 0 b t f 1002 1002 16 374 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 375 ( "=" PGUID 0 b t f 1003 1003 16 375 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 377 ( "=" PGUID 0 b t f 1005 1005 16 377 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 378 ( "=" PGUID 0 b t f 1006 1006 16 378 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 379 ( "=" PGUID 0 b t f 1007 1007 16 379 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 380 ( "=" PGUID 0 b t f 1008 1008 16 380 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 381 ( "=" PGUID 0 b t f 1009 1009 16 381 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 382 ( "=" PGUID 0 b t f 1028 1028 16 382 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 383 ( "=" PGUID 0 b t f 1010 1010 16 383 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 384 ( "=" PGUID 0 b t f 1011 1011 16 384 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 385 ( "=" PGUID 0 b t f 1012 1012 16 385 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 386 ( "=" PGUID 0 b t f 1013 1013 16 386 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 390 ( "=" PGUID 0 b t f 1017 1017 16 390 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 391 ( "=" PGUID 0 b t f 1018 1018 16 391 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 392 ( "=" PGUID 0 b t f 1019 1019 16 392 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 393 ( "=" PGUID 0 b t f 1020 1020 16 393 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 394 ( "=" PGUID 0 b t f 1021 1021 16 394 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 395 ( "=" PGUID 0 b t f 1022 1022 16 395 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 396 ( "=" PGUID 0 b t f 1023 1023 16 396 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 397 ( "=" PGUID 0 b t f 1024 1024 16 397 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 398 ( "=" PGUID 0 b t f 1025 1025 16 398 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 400 ( "=" PGUID 0 b t f 1027 1027 16 400 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 401 ( "=" PGUID 0 b t f 1034 1034 16 401 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 329 ( "=" PGNSP PGUID 0 b t f 1000 1000 16 329 0 0 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 349 ( "=" PGNSP PGUID 0 b t f 1001 1001 16 349 0 0 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 374 ( "=" PGNSP PGUID 0 b t f 1002 1002 16 374 0 0 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 375 ( "=" PGNSP PGUID 0 b t f 1003 1003 16 375 0 0 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 377 ( "=" PGNSP PGUID 0 b t f 1005 1005 16 377 0 0 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 378 ( "=" PGNSP PGUID 0 b t f 1006 1006 16 378 0 0 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 379 ( "=" PGNSP PGUID 0 b t f 1007 1007 16 379 0 0 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 380 ( "=" PGNSP PGUID 0 b t f 1008 1008 16 380 0 0 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 381 ( "=" PGNSP PGUID 0 b t f 1009 1009 16 381 0 0 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 382 ( "=" PGNSP PGUID 0 b t f 1028 1028 16 382 0 0 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 383 ( "=" PGNSP PGUID 0 b t f 1010 1010 16 383 0 0 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 384 ( "=" PGNSP PGUID 0 b t f 1011 1011 16 384 0 0 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 385 ( "=" PGNSP PGUID 0 b t f 1012 1012 16 385 0 0 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 386 ( "=" PGNSP PGUID 0 b t f 1013 1013 16 386 0 0 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 390 ( "=" PGNSP PGUID 0 b t f 1017 1017 16 390 0 0 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 391 ( "=" PGNSP PGUID 0 b t f 1018 1018 16 391 0 0 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 392 ( "=" PGNSP PGUID 0 b t f 1019 1019 16 392 0 0 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 393 ( "=" PGNSP PGUID 0 b t f 1020 1020 16 393 0 0 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 394 ( "=" PGNSP PGUID 0 b t f 1021 1021 16 394 0 0 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 395 ( "=" PGNSP PGUID 0 b t f 1022 1022 16 395 0 0 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 396 ( "=" PGNSP PGUID 0 b t f 1023 1023 16 396 0 0 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 397 ( "=" PGNSP PGUID 0 b t f 1024 1024 16 397 0 0 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 398 ( "=" PGNSP PGUID 0 b t f 1025 1025 16 398 0 0 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 400 ( "=" PGNSP PGUID 0 b t f 1027 1027 16 400 0 0 0 0 0 array_eq eqsel eqjoinsel )); +DATA(insert OID = 401 ( "=" PGNSP PGUID 0 b t f 1034 1034 16 401 0 0 0 0 0 array_eq eqsel eqjoinsel )); -DATA(insert OID = 352 ( "=" PGUID 0 b t t 28 28 16 352 0 0 0 xideq eqsel eqjoinsel )); -DATA(insert OID = 353 ( "=" PGUID 0 b t t 28 23 16 0 0 0 0 xideq eqsel eqjoinsel )); -DATA(insert OID = 387 ( "=" PGUID 0 b t t 27 27 16 387 0 0 0 tideq eqsel eqjoinsel )); +DATA(insert OID = 352 ( "=" PGNSP PGUID 0 b t t 28 28 16 352 0 0 0 0 0 xideq eqsel eqjoinsel )); +DATA(insert OID = 353 ( "=" PGNSP PGUID 0 b t t 28 23 16 0 0 0 0 0 0 xideq eqsel eqjoinsel )); +DATA(insert OID = 387 ( "=" PGNSP PGUID 0 b t t 27 27 16 387 0 0 0 0 0 tideq eqsel eqjoinsel )); #define TIDEqualOperator 387 -DATA(insert OID = 388 ( "!" PGUID 0 r t f 20 0 20 0 0 0 0 int8fac - - )); -DATA(insert OID = 389 ( "!!" PGUID 0 l t f 0 20 20 0 0 0 0 int8fac - - )); +DATA(insert OID = 388 ( "!" PGNSP PGUID 0 r t f 20 0 20 0 0 0 0 0 0 int8fac - - )); +DATA(insert OID = 389 ( "!!" PGNSP PGUID 0 l t f 0 20 20 0 0 0 0 0 0 int8fac - - )); -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 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 = 410 ( "=" PGNSP PGUID 0 b t t 20 20 16 410 411 412 412 412 413 int8eq eqsel eqjoinsel )); +DATA(insert OID = 411 ( "<>" PGNSP PGUID 0 b t f 20 20 16 411 410 0 0 0 0 int8ne neqsel neqjoinsel )); +DATA(insert OID = 412 ( "<" PGNSP PGUID 0 b t f 20 20 16 413 415 0 0 0 0 int8lt scalarltsel scalarltjoinsel )); +DATA(insert OID = 413 ( ">" PGNSP PGUID 0 b t f 20 20 16 412 414 0 0 0 0 int8gt scalargtsel scalargtjoinsel )); +DATA(insert OID = 414 ( "<=" PGNSP PGUID 0 b t f 20 20 16 415 413 0 0 0 0 int8le scalarltsel scalarltjoinsel )); +DATA(insert OID = 415 ( ">=" PGNSP PGUID 0 b t f 20 20 16 414 412 0 0 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 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 = 439 ( "%" PGUID 0 b t f 20 20 20 0 0 0 0 int8mod - - )); -DATA(insert OID = 473 ( "@" PGUID 0 l t f 0 20 20 0 0 0 0 int8abs - - )); +DATA(insert OID = 416 ( "=" PGNSP PGUID 0 b t f 20 23 16 15 417 412 97 418 419 int84eq eqsel eqjoinsel )); +DATA(insert OID = 417 ( "<>" PGNSP PGUID 0 b t f 20 23 16 36 416 0 0 0 0 int84ne neqsel neqjoinsel )); +DATA(insert OID = 418 ( "<" PGNSP PGUID 0 b t f 20 23 16 76 430 0 0 0 0 int84lt scalarltsel scalarltjoinsel )); +DATA(insert OID = 419 ( ">" PGNSP PGUID 0 b t f 20 23 16 37 420 0 0 0 0 int84gt scalargtsel scalargtjoinsel )); +DATA(insert OID = 420 ( "<=" PGNSP PGUID 0 b t f 20 23 16 82 419 0 0 0 0 int84le scalarltsel scalarltjoinsel )); +DATA(insert OID = 430 ( ">=" PGNSP PGUID 0 b t f 20 23 16 80 418 0 0 0 0 int84ge scalargtsel scalargtjoinsel )); +DATA(insert OID = 439 ( "%" PGNSP PGUID 0 b t f 20 20 20 0 0 0 0 0 0 int8mod - - )); +DATA(insert OID = 473 ( "@" PGNSP PGUID 0 l t f 0 20 20 0 0 0 0 0 0 int8abs - - )); -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 positionsel positionjoinsel )); -DATA(insert OID = 486 ( "&<" PGUID 0 b t f 604 604 16 0 0 0 0 poly_overleft positionsel positionjoinsel )); -DATA(insert OID = 487 ( "&>" PGUID 0 b t f 604 604 16 0 0 0 0 poly_overright positionsel positionjoinsel )); -DATA(insert OID = 488 ( ">>" PGUID 0 b t f 604 604 16 0 0 0 0 poly_right positionsel positionjoinsel )); -DATA(insert OID = 489 ( "@" PGUID 0 b t f 604 604 16 490 0 0 0 poly_contained contsel contjoinsel )); -DATA(insert OID = 490 ( "~" PGUID 0 b t f 604 604 16 489 0 0 0 poly_contain contsel contjoinsel )); -DATA(insert OID = 491 ( "~=" PGUID 0 b t f 604 604 16 491 0 0 0 poly_same eqsel eqjoinsel )); -DATA(insert OID = 492 ( "&&" PGUID 0 b t f 604 604 16 492 0 0 0 poly_overlap areasel areajoinsel )); -DATA(insert OID = 493 ( "<<" PGUID 0 b t f 603 603 16 0 0 0 0 box_left positionsel positionjoinsel )); -DATA(insert OID = 494 ( "&<" PGUID 0 b t f 603 603 16 0 0 0 0 box_overleft positionsel positionjoinsel )); -DATA(insert OID = 495 ( "&>" PGUID 0 b t f 603 603 16 0 0 0 0 box_overright positionsel positionjoinsel )); -DATA(insert OID = 496 ( ">>" PGUID 0 b t f 603 603 16 0 0 0 0 box_right positionsel positionjoinsel )); -DATA(insert OID = 497 ( "@" PGUID 0 b t f 603 603 16 498 0 0 0 box_contained contsel contjoinsel )); -DATA(insert OID = 498 ( "~" PGUID 0 b t f 603 603 16 497 0 0 0 box_contain contsel contjoinsel )); -DATA(insert OID = 499 ( "~=" PGUID 0 b t f 603 603 16 499 0 0 0 box_same eqsel eqjoinsel )); -DATA(insert OID = 500 ( "&&" PGUID 0 b t f 603 603 16 500 0 0 0 box_overlap areasel areajoinsel )); -DATA(insert OID = 501 ( ">=" PGUID 0 b t f 603 603 16 505 504 0 0 box_ge areasel areajoinsel )); -DATA(insert OID = 502 ( ">" PGUID 0 b t f 603 603 16 504 505 0 0 box_gt areasel areajoinsel )); -DATA(insert OID = 503 ( "=" PGUID 0 b t f 603 603 16 503 0 504 504 box_eq eqsel eqjoinsel )); -DATA(insert OID = 504 ( "<" PGUID 0 b t f 603 603 16 502 501 0 0 box_lt areasel areajoinsel )); -DATA(insert OID = 505 ( "<=" PGUID 0 b t f 603 603 16 501 502 0 0 box_le areasel areajoinsel )); -DATA(insert OID = 506 ( ">^" PGUID 0 b t f 600 600 16 0 0 0 0 point_above positionsel positionjoinsel )); -DATA(insert OID = 507 ( "<<" PGUID 0 b t f 600 600 16 0 0 0 0 point_left positionsel positionjoinsel )); -DATA(insert OID = 508 ( ">>" PGUID 0 b t f 600 600 16 0 0 0 0 point_right positionsel positionjoinsel )); -DATA(insert OID = 509 ( "<^" PGUID 0 b t f 600 600 16 0 0 0 0 point_below positionsel positionjoinsel )); -DATA(insert OID = 510 ( "~=" PGUID 0 b t f 600 600 16 510 0 0 0 point_eq eqsel eqjoinsel )); -DATA(insert OID = 511 ( "@" PGUID 0 b t f 600 603 16 0 0 0 0 on_pb - - )); -DATA(insert OID = 512 ( "@" PGUID 0 b t f 600 602 16 755 0 0 0 on_ppath - - )); -DATA(insert OID = 513 ( "@@" PGUID 0 l t f 0 603 600 0 0 0 0 box_center - - )); -DATA(insert OID = 514 ( "*" PGUID 0 b t f 23 23 23 514 0 0 0 int4mul - - )); -DATA(insert OID = 515 ( "!" PGUID 0 r t f 23 0 23 0 0 0 0 int4fac - - )); -DATA(insert OID = 516 ( "!!" PGUID 0 l t f 0 23 23 0 0 0 0 int4fac - - )); -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 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 - - )); -DATA(insert OID = 529 ( "%" PGUID 0 b t f 21 21 21 0 0 0 0 int2mod - - )); -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 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 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 - - )); -DATA(insert OID = 547 ( "/" PGUID 0 b t f 23 21 23 0 0 0 0 int42div - - )); -DATA(insert OID = 548 ( "%" PGUID 0 b t f 21 23 23 0 0 0 0 int24mod - - )); -DATA(insert OID = 549 ( "%" PGUID 0 b t f 23 21 23 0 0 0 0 int42mod - - )); -DATA(insert OID = 550 ( "+" PGUID 0 b t f 21 21 21 550 0 0 0 int2pl - - )); -DATA(insert OID = 551 ( "+" PGUID 0 b t f 23 23 23 551 0 0 0 int4pl - - )); -DATA(insert OID = 552 ( "+" PGUID 0 b t f 21 23 23 553 0 0 0 int24pl - - )); -DATA(insert OID = 553 ( "+" PGUID 0 b t f 23 21 23 552 0 0 0 int42pl - - )); -DATA(insert OID = 554 ( "-" PGUID 0 b t f 21 21 21 0 0 0 0 int2mi - - )); -DATA(insert OID = 555 ( "-" PGUID 0 b t f 23 23 23 0 0 0 0 int4mi - - )); -DATA(insert OID = 556 ( "-" PGUID 0 b t f 21 23 23 0 0 0 0 int24mi - - )); -DATA(insert OID = 557 ( "-" PGUID 0 b t f 23 21 23 0 0 0 0 int42mi - - )); -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 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 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 tintervalsame eqsel eqjoinsel )); -DATA(insert OID = 573 ( "<<" PGUID 0 b t f 704 704 16 0 0 0 0 tintervalct - - )); -DATA(insert OID = 574 ( "&&" PGUID 0 b t f 704 704 16 574 0 0 0 tintervalov - - )); -DATA(insert OID = 575 ( "#=" PGUID 0 b t f 704 703 16 0 576 0 0 tintervalleneq - - )); -DATA(insert OID = 576 ( "#<>" PGUID 0 b t f 704 703 16 0 575 0 0 tintervallenne - - )); -DATA(insert OID = 577 ( "#<" PGUID 0 b t f 704 703 16 0 580 0 0 tintervallenlt - - )); -DATA(insert OID = 578 ( "#>" PGUID 0 b t f 704 703 16 0 579 0 0 tintervallengt - - )); -DATA(insert OID = 579 ( "#<=" PGUID 0 b t f 704 703 16 0 578 0 0 tintervallenle - - )); -DATA(insert OID = 580 ( "#>=" PGUID 0 b t f 704 703 16 0 577 0 0 tintervallenge - - )); -DATA(insert OID = 581 ( "+" PGUID 0 b t f 702 703 702 0 0 0 0 timepl - - )); -DATA(insert OID = 582 ( "-" PGUID 0 b t f 702 703 702 0 0 0 0 timemi - - )); -DATA(insert OID = 583 ( "" PGUID 0 b t f 702 704 16 0 0 0 0 intinterval - - )); -DATA(insert OID = 584 ( "-" PGUID 0 l t f 0 700 700 0 0 0 0 float4um - - )); -DATA(insert OID = 585 ( "-" PGUID 0 l t f 0 701 701 0 0 0 0 float8um - - )); -DATA(insert OID = 586 ( "+" PGUID 0 b t f 700 700 700 586 0 0 0 float4pl - - )); -DATA(insert OID = 587 ( "-" PGUID 0 b t f 700 700 700 0 0 0 0 float4mi - - )); -DATA(insert OID = 588 ( "/" PGUID 0 b t f 700 700 700 0 0 0 0 float4div - - )); -DATA(insert OID = 589 ( "*" PGUID 0 b t f 700 700 700 589 0 0 0 float4mul - - )); -DATA(insert OID = 590 ( "@" PGUID 0 l t f 0 700 700 0 0 0 0 float4abs - - )); -DATA(insert OID = 591 ( "+" PGUID 0 b t f 701 701 701 591 0 0 0 float8pl - - )); -DATA(insert OID = 592 ( "-" PGUID 0 b t f 701 701 701 0 0 0 0 float8mi - - )); -DATA(insert OID = 593 ( "/" PGUID 0 b t f 701 701 701 0 0 0 0 float8div - - )); -DATA(insert OID = 594 ( "*" PGUID 0 b t f 701 701 701 594 0 0 0 float8mul - - )); -DATA(insert OID = 595 ( "@" PGUID 0 l t f 0 701 701 0 0 0 0 float8abs - - )); -DATA(insert OID = 596 ( "|/" PGUID 0 l t f 0 701 701 0 0 0 0 dsqrt - - )); -DATA(insert OID = 597 ( "||/" PGUID 0 l t f 0 701 701 0 0 0 0 dcbrt - - )); -DATA(insert OID = 598 ( "%" PGUID 0 l t f 0 701 701 0 0 0 0 dtrunc - - )); -DATA(insert OID = 599 ( "%" PGUID 0 r t f 701 0 701 0 0 0 0 dround - - )); -DATA(insert OID = 1284 ( "|" PGUID 0 l t f 0 704 702 0 0 0 0 tintervalstart - - )); -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 )); +DATA(insert OID = 484 ( "-" PGNSP PGUID 0 l t f 0 20 20 0 0 0 0 0 0 int8um - - )); +DATA(insert OID = 485 ( "<<" PGNSP PGUID 0 b t f 604 604 16 0 0 0 0 0 0 poly_left positionsel positionjoinsel )); +DATA(insert OID = 486 ( "&<" PGNSP PGUID 0 b t f 604 604 16 0 0 0 0 0 0 poly_overleft positionsel positionjoinsel )); +DATA(insert OID = 487 ( "&>" PGNSP PGUID 0 b t f 604 604 16 0 0 0 0 0 0 poly_overright positionsel positionjoinsel )); +DATA(insert OID = 488 ( ">>" PGNSP PGUID 0 b t f 604 604 16 0 0 0 0 0 0 poly_right positionsel positionjoinsel )); +DATA(insert OID = 489 ( "@" PGNSP PGUID 0 b t f 604 604 16 490 0 0 0 0 0 poly_contained contsel contjoinsel )); +DATA(insert OID = 490 ( "~" PGNSP PGUID 0 b t f 604 604 16 489 0 0 0 0 0 poly_contain contsel contjoinsel )); +DATA(insert OID = 491 ( "~=" PGNSP PGUID 0 b t f 604 604 16 491 0 0 0 0 0 poly_same eqsel eqjoinsel )); +DATA(insert OID = 492 ( "&&" PGNSP PGUID 0 b t f 604 604 16 492 0 0 0 0 0 poly_overlap areasel areajoinsel )); +DATA(insert OID = 493 ( "<<" PGNSP PGUID 0 b t f 603 603 16 0 0 0 0 0 0 box_left positionsel positionjoinsel )); +DATA(insert OID = 494 ( "&<" PGNSP PGUID 0 b t f 603 603 16 0 0 0 0 0 0 box_overleft positionsel positionjoinsel )); +DATA(insert OID = 495 ( "&>" PGNSP PGUID 0 b t f 603 603 16 0 0 0 0 0 0 box_overright positionsel positionjoinsel )); +DATA(insert OID = 496 ( ">>" PGNSP PGUID 0 b t f 603 603 16 0 0 0 0 0 0 box_right positionsel positionjoinsel )); +DATA(insert OID = 497 ( "@" PGNSP PGUID 0 b t f 603 603 16 498 0 0 0 0 0 box_contained contsel contjoinsel )); +DATA(insert OID = 498 ( "~" PGNSP PGUID 0 b t f 603 603 16 497 0 0 0 0 0 box_contain contsel contjoinsel )); +DATA(insert OID = 499 ( "~=" PGNSP PGUID 0 b t f 603 603 16 499 0 0 0 0 0 box_same eqsel eqjoinsel )); +DATA(insert OID = 500 ( "&&" PGNSP PGUID 0 b t f 603 603 16 500 0 0 0 0 0 box_overlap areasel areajoinsel )); +DATA(insert OID = 501 ( ">=" PGNSP PGUID 0 b t f 603 603 16 505 504 0 0 0 0 box_ge areasel areajoinsel )); +DATA(insert OID = 502 ( ">" PGNSP PGUID 0 b t f 603 603 16 504 505 0 0 0 0 box_gt areasel areajoinsel )); +DATA(insert OID = 503 ( "=" PGNSP PGUID 0 b t f 603 603 16 503 0 504 504 504 502 box_eq eqsel eqjoinsel )); +DATA(insert OID = 504 ( "<" PGNSP PGUID 0 b t f 603 603 16 502 501 0 0 0 0 box_lt areasel areajoinsel )); +DATA(insert OID = 505 ( "<=" PGNSP PGUID 0 b t f 603 603 16 501 502 0 0 0 0 box_le areasel areajoinsel )); +DATA(insert OID = 506 ( ">^" PGNSP PGUID 0 b t f 600 600 16 0 0 0 0 0 0 point_above positionsel positionjoinsel )); +DATA(insert OID = 507 ( "<<" PGNSP PGUID 0 b t f 600 600 16 0 0 0 0 0 0 point_left positionsel positionjoinsel )); +DATA(insert OID = 508 ( ">>" PGNSP PGUID 0 b t f 600 600 16 0 0 0 0 0 0 point_right positionsel positionjoinsel )); +DATA(insert OID = 509 ( "<^" PGNSP PGUID 0 b t f 600 600 16 0 0 0 0 0 0 point_below positionsel positionjoinsel )); +DATA(insert OID = 510 ( "~=" PGNSP PGUID 0 b t f 600 600 16 510 0 0 0 0 0 point_eq eqsel eqjoinsel )); +DATA(insert OID = 511 ( "@" PGNSP PGUID 0 b t f 600 603 16 0 0 0 0 0 0 on_pb - - )); +DATA(insert OID = 512 ( "@" PGNSP PGUID 0 b t f 600 602 16 755 0 0 0 0 0 on_ppath - - )); +DATA(insert OID = 513 ( "@@" PGNSP PGUID 0 l t f 0 603 600 0 0 0 0 0 0 box_center - - )); +DATA(insert OID = 514 ( "*" PGNSP PGUID 0 b t f 23 23 23 514 0 0 0 0 0 int4mul - - )); +DATA(insert OID = 515 ( "!" PGNSP PGUID 0 r t f 23 0 23 0 0 0 0 0 0 int4fac - - )); +DATA(insert OID = 516 ( "!!" PGNSP PGUID 0 l t f 0 23 23 0 0 0 0 0 0 int4fac - - )); +DATA(insert OID = 517 ( "<->" PGNSP PGUID 0 b t f 600 600 701 517 0 0 0 0 0 point_distance - - )); +DATA(insert OID = 518 ( "<>" PGNSP PGUID 0 b t f 23 23 16 518 96 0 0 0 0 int4ne neqsel neqjoinsel )); +DATA(insert OID = 519 ( "<>" PGNSP PGUID 0 b t f 21 21 16 519 94 0 0 0 0 int2ne neqsel neqjoinsel )); +DATA(insert OID = 520 ( ">" PGNSP PGUID 0 b t f 21 21 16 95 522 0 0 0 0 int2gt scalargtsel scalargtjoinsel )); +DATA(insert OID = 521 ( ">" PGNSP PGUID 0 b t f 23 23 16 97 523 0 0 0 0 int4gt scalargtsel scalargtjoinsel )); +DATA(insert OID = 522 ( "<=" PGNSP PGUID 0 b t f 21 21 16 524 520 0 0 0 0 int2le scalarltsel scalarltjoinsel )); +DATA(insert OID = 523 ( "<=" PGNSP PGUID 0 b t f 23 23 16 525 521 0 0 0 0 int4le scalarltsel scalarltjoinsel )); +DATA(insert OID = 524 ( ">=" PGNSP PGUID 0 b t f 21 21 16 522 95 0 0 0 0 int2ge scalargtsel scalargtjoinsel )); +DATA(insert OID = 525 ( ">=" PGNSP PGUID 0 b t f 23 23 16 523 97 0 0 0 0 int4ge scalargtsel scalargtjoinsel )); +DATA(insert OID = 526 ( "*" PGNSP PGUID 0 b t f 21 21 21 526 0 0 0 0 0 int2mul - - )); +DATA(insert OID = 527 ( "/" PGNSP PGUID 0 b t f 21 21 21 0 0 0 0 0 0 int2div - - )); +DATA(insert OID = 528 ( "/" PGNSP PGUID 0 b t f 23 23 23 0 0 0 0 0 0 int4div - - )); +DATA(insert OID = 529 ( "%" PGNSP PGUID 0 b t f 21 21 21 0 0 0 0 0 0 int2mod - - )); +DATA(insert OID = 530 ( "%" PGNSP PGUID 0 b t f 23 23 23 0 0 0 0 0 0 int4mod - - )); +DATA(insert OID = 531 ( "<>" PGNSP PGUID 0 b t f 25 25 16 531 98 0 0 0 0 textne neqsel neqjoinsel )); +DATA(insert OID = 532 ( "=" PGNSP PGUID 0 b t f 21 23 16 533 538 95 97 534 536 int24eq eqsel eqjoinsel )); +DATA(insert OID = 533 ( "=" PGNSP PGUID 0 b t f 23 21 16 532 539 97 95 535 537 int42eq eqsel eqjoinsel )); +DATA(insert OID = 534 ( "<" PGNSP PGUID 0 b t f 21 23 16 537 542 0 0 0 0 int24lt scalarltsel scalarltjoinsel )); +DATA(insert OID = 535 ( "<" PGNSP PGUID 0 b t f 23 21 16 536 543 0 0 0 0 int42lt scalarltsel scalarltjoinsel )); +DATA(insert OID = 536 ( ">" PGNSP PGUID 0 b t f 21 23 16 535 540 0 0 0 0 int24gt scalargtsel scalargtjoinsel )); +DATA(insert OID = 537 ( ">" PGNSP PGUID 0 b t f 23 21 16 534 541 0 0 0 0 int42gt scalargtsel scalargtjoinsel )); +DATA(insert OID = 538 ( "<>" PGNSP PGUID 0 b t f 21 23 16 539 532 0 0 0 0 int24ne neqsel neqjoinsel )); +DATA(insert OID = 539 ( "<>" PGNSP PGUID 0 b t f 23 21 16 538 533 0 0 0 0 int42ne neqsel neqjoinsel )); +DATA(insert OID = 540 ( "<=" PGNSP PGUID 0 b t f 21 23 16 543 536 0 0 0 0 int24le scalarltsel scalarltjoinsel )); +DATA(insert OID = 541 ( "<=" PGNSP PGUID 0 b t f 23 21 16 542 537 0 0 0 0 int42le scalarltsel scalarltjoinsel )); +DATA(insert OID = 542 ( ">=" PGNSP PGUID 0 b t f 21 23 16 541 534 0 0 0 0 int24ge scalargtsel scalargtjoinsel )); +DATA(insert OID = 543 ( ">=" PGNSP PGUID 0 b t f 23 21 16 540 535 0 0 0 0 int42ge scalargtsel scalargtjoinsel )); +DATA(insert OID = 544 ( "*" PGNSP PGUID 0 b t f 21 23 23 545 0 0 0 0 0 int24mul - - )); +DATA(insert OID = 545 ( "*" PGNSP PGUID 0 b t f 23 21 23 544 0 0 0 0 0 int42mul - - )); +DATA(insert OID = 546 ( "/" PGNSP PGUID 0 b t f 21 23 23 0 0 0 0 0 0 int24div - - )); +DATA(insert OID = 547 ( "/" PGNSP PGUID 0 b t f 23 21 23 0 0 0 0 0 0 int42div - - )); +DATA(insert OID = 548 ( "%" PGNSP PGUID 0 b t f 21 23 23 0 0 0 0 0 0 int24mod - - )); +DATA(insert OID = 549 ( "%" PGNSP PGUID 0 b t f 23 21 23 0 0 0 0 0 0 int42mod - - )); +DATA(insert OID = 550 ( "+" PGNSP PGUID 0 b t f 21 21 21 550 0 0 0 0 0 int2pl - - )); +DATA(insert OID = 551 ( "+" PGNSP PGUID 0 b t f 23 23 23 551 0 0 0 0 0 int4pl - - )); +DATA(insert OID = 552 ( "+" PGNSP PGUID 0 b t f 21 23 23 553 0 0 0 0 0 int24pl - - )); +DATA(insert OID = 553 ( "+" PGNSP PGUID 0 b t f 23 21 23 552 0 0 0 0 0 int42pl - - )); +DATA(insert OID = 554 ( "-" PGNSP PGUID 0 b t f 21 21 21 0 0 0 0 0 0 int2mi - - )); +DATA(insert OID = 555 ( "-" PGNSP PGUID 0 b t f 23 23 23 0 0 0 0 0 0 int4mi - - )); +DATA(insert OID = 556 ( "-" PGNSP PGUID 0 b t f 21 23 23 0 0 0 0 0 0 int24mi - - )); +DATA(insert OID = 557 ( "-" PGNSP PGUID 0 b t f 23 21 23 0 0 0 0 0 0 int42mi - - )); +DATA(insert OID = 558 ( "-" PGNSP PGUID 0 l t f 0 23 23 0 0 0 0 0 0 int4um - - )); +DATA(insert OID = 559 ( "-" PGNSP PGUID 0 l t f 0 21 21 0 0 0 0 0 0 int2um - - )); +DATA(insert OID = 560 ( "=" PGNSP PGUID 0 b t t 702 702 16 560 561 562 562 562 563 abstimeeq eqsel eqjoinsel )); +DATA(insert OID = 561 ( "<>" PGNSP PGUID 0 b t f 702 702 16 561 560 0 0 0 0 abstimene neqsel neqjoinsel )); +DATA(insert OID = 562 ( "<" PGNSP PGUID 0 b t f 702 702 16 563 565 0 0 0 0 abstimelt scalarltsel scalarltjoinsel )); +DATA(insert OID = 563 ( ">" PGNSP PGUID 0 b t f 702 702 16 562 564 0 0 0 0 abstimegt scalargtsel scalargtjoinsel )); +DATA(insert OID = 564 ( "<=" PGNSP PGUID 0 b t f 702 702 16 565 563 0 0 0 0 abstimele scalarltsel scalarltjoinsel )); +DATA(insert OID = 565 ( ">=" PGNSP PGUID 0 b t f 702 702 16 564 562 0 0 0 0 abstimege scalargtsel scalargtjoinsel )); +DATA(insert OID = 566 ( "=" PGNSP PGUID 0 b t t 703 703 16 566 567 568 568 568 569 reltimeeq eqsel eqjoinsel )); +DATA(insert OID = 567 ( "<>" PGNSP PGUID 0 b t f 703 703 16 567 566 0 0 0 0 reltimene neqsel neqjoinsel )); +DATA(insert OID = 568 ( "<" PGNSP PGUID 0 b t f 703 703 16 569 571 0 0 0 0 reltimelt scalarltsel scalarltjoinsel )); +DATA(insert OID = 569 ( ">" PGNSP PGUID 0 b t f 703 703 16 568 570 0 0 0 0 reltimegt scalargtsel scalargtjoinsel )); +DATA(insert OID = 570 ( "<=" PGNSP PGUID 0 b t f 703 703 16 571 569 0 0 0 0 reltimele scalarltsel scalarltjoinsel )); +DATA(insert OID = 571 ( ">=" PGNSP PGUID 0 b t f 703 703 16 570 568 0 0 0 0 reltimege scalargtsel scalargtjoinsel )); +DATA(insert OID = 572 ( "~=" PGNSP PGUID 0 b t f 704 704 16 572 0 0 0 0 0 tintervalsame eqsel eqjoinsel )); +DATA(insert OID = 573 ( "<<" PGNSP PGUID 0 b t f 704 704 16 0 0 0 0 0 0 tintervalct - - )); +DATA(insert OID = 574 ( "&&" PGNSP PGUID 0 b t f 704 704 16 574 0 0 0 0 0 tintervalov - - )); +DATA(insert OID = 575 ( "#=" PGNSP PGUID 0 b t f 704 703 16 0 576 0 0 0 0 tintervalleneq - - )); +DATA(insert OID = 576 ( "#<>" PGNSP PGUID 0 b t f 704 703 16 0 575 0 0 0 0 tintervallenne - - )); +DATA(insert OID = 577 ( "#<" PGNSP PGUID 0 b t f 704 703 16 0 580 0 0 0 0 tintervallenlt - - )); +DATA(insert OID = 578 ( "#>" PGNSP PGUID 0 b t f 704 703 16 0 579 0 0 0 0 tintervallengt - - )); +DATA(insert OID = 579 ( "#<=" PGNSP PGUID 0 b t f 704 703 16 0 578 0 0 0 0 tintervallenle - - )); +DATA(insert OID = 580 ( "#>=" PGNSP PGUID 0 b t f 704 703 16 0 577 0 0 0 0 tintervallenge - - )); +DATA(insert OID = 581 ( "+" PGNSP PGUID 0 b t f 702 703 702 0 0 0 0 0 0 timepl - - )); +DATA(insert OID = 582 ( "-" PGNSP PGUID 0 b t f 702 703 702 0 0 0 0 0 0 timemi - - )); +DATA(insert OID = 583 ( "" PGNSP PGUID 0 b t f 702 704 16 0 0 0 0 0 0 intinterval - - )); +DATA(insert OID = 584 ( "-" PGNSP PGUID 0 l t f 0 700 700 0 0 0 0 0 0 float4um - - )); +DATA(insert OID = 585 ( "-" PGNSP PGUID 0 l t f 0 701 701 0 0 0 0 0 0 float8um - - )); +DATA(insert OID = 586 ( "+" PGNSP PGUID 0 b t f 700 700 700 586 0 0 0 0 0 float4pl - - )); +DATA(insert OID = 587 ( "-" PGNSP PGUID 0 b t f 700 700 700 0 0 0 0 0 0 float4mi - - )); +DATA(insert OID = 588 ( "/" PGNSP PGUID 0 b t f 700 700 700 0 0 0 0 0 0 float4div - - )); +DATA(insert OID = 589 ( "*" PGNSP PGUID 0 b t f 700 700 700 589 0 0 0 0 0 float4mul - - )); +DATA(insert OID = 590 ( "@" PGNSP PGUID 0 l t f 0 700 700 0 0 0 0 0 0 float4abs - - )); +DATA(insert OID = 591 ( "+" PGNSP PGUID 0 b t f 701 701 701 591 0 0 0 0 0 float8pl - - )); +DATA(insert OID = 592 ( "-" PGNSP PGUID 0 b t f 701 701 701 0 0 0 0 0 0 float8mi - - )); +DATA(insert OID = 593 ( "/" PGNSP PGUID 0 b t f 701 701 701 0 0 0 0 0 0 float8div - - )); +DATA(insert OID = 594 ( "*" PGNSP PGUID 0 b t f 701 701 701 594 0 0 0 0 0 float8mul - - )); +DATA(insert OID = 595 ( "@" PGNSP PGUID 0 l t f 0 701 701 0 0 0 0 0 0 float8abs - - )); +DATA(insert OID = 596 ( "|/" PGNSP PGUID 0 l t f 0 701 701 0 0 0 0 0 0 dsqrt - - )); +DATA(insert OID = 597 ( "||/" PGNSP PGUID 0 l t f 0 701 701 0 0 0 0 0 0 dcbrt - - )); +DATA(insert OID = 598 ( "%" PGNSP PGUID 0 l t f 0 701 701 0 0 0 0 0 0 dtrunc - - )); +DATA(insert OID = 599 ( "%" PGNSP PGUID 0 r t f 701 0 701 0 0 0 0 0 0 dround - - )); +DATA(insert OID = 1284 ( "|" PGNSP PGUID 0 l t f 0 704 702 0 0 0 0 0 0 tintervalstart - - )); +DATA(insert OID = 606 ( "<#>" PGNSP PGUID 0 b t f 702 702 704 0 0 0 0 0 0 mktinterval - - )); +DATA(insert OID = 607 ( "=" PGNSP PGUID 0 b t t 26 26 16 607 608 609 609 609 610 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 oidlt scalarltsel scalarltjoinsel )); -DATA(insert OID = 610 ( ">" PGUID 0 b t f 26 26 16 609 611 0 0 oidgt scalargtsel scalargtjoinsel )); -DATA(insert OID = 611 ( "<=" PGUID 0 b t f 26 26 16 612 610 0 0 oidle scalarltsel scalarltjoinsel )); -DATA(insert OID = 612 ( ">=" PGUID 0 b t f 26 26 16 611 609 0 0 oidge scalargtsel scalargtjoinsel )); +DATA(insert OID = 608 ( "<>" PGNSP PGUID 0 b t f 26 26 16 608 607 0 0 0 0 oidne neqsel neqjoinsel )); +DATA(insert OID = 609 ( "<" PGNSP PGUID 0 b t f 26 26 16 610 612 0 0 0 0 oidlt scalarltsel scalarltjoinsel )); +DATA(insert OID = 610 ( ">" PGNSP PGUID 0 b t f 26 26 16 609 611 0 0 0 0 oidgt scalargtsel scalargtjoinsel )); +DATA(insert OID = 611 ( "<=" PGNSP PGUID 0 b t f 26 26 16 612 610 0 0 0 0 oidle scalarltsel scalarltjoinsel )); +DATA(insert OID = 612 ( ">=" PGNSP PGUID 0 b t f 26 26 16 611 609 0 0 0 0 oidge 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 scalarltsel scalarltjoinsel )); -DATA(insert OID = 646 ( ">" PGUID 0 b t f 30 30 16 645 647 0 0 oidvectorgt scalargtsel scalargtjoinsel )); -DATA(insert OID = 647 ( "<=" PGUID 0 b t f 30 30 16 648 646 0 0 oidvectorle scalarltsel scalarltjoinsel )); -DATA(insert OID = 648 ( ">=" PGUID 0 b t f 30 30 16 647 645 0 0 oidvectorge scalargtsel scalargtjoinsel )); -DATA(insert OID = 649 ( "=" PGUID 0 b t t 30 30 16 649 644 645 645 oidvectoreq eqsel eqjoinsel )); +DATA(insert OID = 644 ( "<>" PGNSP PGUID 0 b t f 30 30 16 644 649 0 0 0 0 oidvectorne neqsel neqjoinsel )); +DATA(insert OID = 645 ( "<" PGNSP PGUID 0 b t f 30 30 16 646 648 0 0 0 0 oidvectorlt scalarltsel scalarltjoinsel )); +DATA(insert OID = 646 ( ">" PGNSP PGUID 0 b t f 30 30 16 645 647 0 0 0 0 oidvectorgt scalargtsel scalargtjoinsel )); +DATA(insert OID = 647 ( "<=" PGNSP PGUID 0 b t f 30 30 16 648 646 0 0 0 0 oidvectorle scalarltsel scalarltjoinsel )); +DATA(insert OID = 648 ( ">=" PGNSP PGUID 0 b t f 30 30 16 647 645 0 0 0 0 oidvectorge scalargtsel scalargtjoinsel )); +DATA(insert OID = 649 ( "=" PGNSP PGUID 0 b t t 30 30 16 649 644 645 645 645 646 oidvectoreq eqsel eqjoinsel )); -DATA(insert OID = 613 ( "<->" PGUID 0 b t f 600 628 701 0 0 0 0 dist_pl - - )); -DATA(insert OID = 614 ( "<->" PGUID 0 b t f 600 601 701 0 0 0 0 dist_ps - - )); -DATA(insert OID = 615 ( "<->" PGUID 0 b t f 600 603 701 0 0 0 0 dist_pb - - )); -DATA(insert OID = 616 ( "<->" PGUID 0 b t f 601 628 701 0 0 0 0 dist_sl - - )); -DATA(insert OID = 617 ( "<->" PGUID 0 b t f 601 603 701 0 0 0 0 dist_sb - - )); -DATA(insert OID = 618 ( "<->" PGUID 0 b t f 600 602 701 0 0 0 0 dist_ppath - - )); +DATA(insert OID = 613 ( "<->" PGNSP PGUID 0 b t f 600 628 701 0 0 0 0 0 0 dist_pl - - )); +DATA(insert OID = 614 ( "<->" PGNSP PGUID 0 b t f 600 601 701 0 0 0 0 0 0 dist_ps - - )); +DATA(insert OID = 615 ( "<->" PGNSP PGUID 0 b t f 600 603 701 0 0 0 0 0 0 dist_pb - - )); +DATA(insert OID = 616 ( "<->" PGNSP PGUID 0 b t f 601 628 701 0 0 0 0 0 0 dist_sl - - )); +DATA(insert OID = 617 ( "<->" PGNSP PGUID 0 b t f 601 603 701 0 0 0 0 0 0 dist_sb - - )); +DATA(insert OID = 618 ( "<->" PGNSP PGUID 0 b t f 600 602 701 0 0 0 0 0 0 dist_ppath - - )); -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 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 25 16 0 0 0 0 int4notin - - )); -DATA(insert OID = 627 ( "!!=" PGUID 0 b t f 26 25 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 = 620 ( "=" PGNSP PGUID 0 b t f 700 700 16 620 621 622 622 622 623 float4eq eqsel eqjoinsel )); +DATA(insert OID = 621 ( "<>" PGNSP PGUID 0 b t f 700 700 16 621 620 0 0 0 0 float4ne neqsel neqjoinsel )); +DATA(insert OID = 622 ( "<" PGNSP PGUID 0 b t f 700 700 16 623 625 0 0 0 0 float4lt scalarltsel scalarltjoinsel )); +DATA(insert OID = 623 ( ">" PGNSP PGUID 0 b t f 700 700 16 622 624 0 0 0 0 float4gt scalargtsel scalargtjoinsel )); +DATA(insert OID = 624 ( "<=" PGNSP PGUID 0 b t f 700 700 16 625 623 0 0 0 0 float4le scalarltsel scalarltjoinsel )); +DATA(insert OID = 625 ( ">=" PGNSP PGUID 0 b t f 700 700 16 624 622 0 0 0 0 float4ge scalargtsel scalargtjoinsel )); +DATA(insert OID = 626 ( "!!=" PGNSP PGUID 0 b t f 23 25 16 0 0 0 0 0 0 int4notin - - )); +DATA(insert OID = 627 ( "!!=" PGNSP PGUID 0 b t f 26 25 16 0 0 0 0 0 0 oidnotin - - )); +DATA(insert OID = 630 ( "<>" PGNSP PGUID 0 b t f 18 18 16 630 92 0 0 0 0 charne neqsel neqjoinsel )); -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 = 631 ( "<" PGNSP PGUID 0 b t f 18 18 16 633 634 0 0 0 0 charlt scalarltsel scalarltjoinsel )); +DATA(insert OID = 632 ( "<=" PGNSP PGUID 0 b t f 18 18 16 634 633 0 0 0 0 charle scalarltsel scalarltjoinsel )); +DATA(insert OID = 633 ( ">" PGNSP PGUID 0 b t f 18 18 16 631 632 0 0 0 0 chargt scalargtsel scalargtjoinsel )); +DATA(insert OID = 634 ( ">=" PGNSP PGUID 0 b t f 18 18 16 632 631 0 0 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 - - )); -DATA(insert OID = 637 ( "*" PGUID 0 b t f 18 18 18 0 0 0 0 charmul - - )); -DATA(insert OID = 638 ( "/" PGUID 0 b t f 18 18 18 0 0 0 0 chardiv - - )); +DATA(insert OID = 635 ( "+" PGNSP PGUID 0 b t f 18 18 18 0 0 0 0 0 0 charpl - - )); +DATA(insert OID = 636 ( "-" PGNSP PGUID 0 b t f 18 18 18 0 0 0 0 0 0 charmi - - )); +DATA(insert OID = 637 ( "*" PGNSP PGUID 0 b t f 18 18 18 0 0 0 0 0 0 charmul - - )); +DATA(insert OID = 638 ( "/" PGNSP PGUID 0 b t f 18 18 18 0 0 0 0 0 0 chardiv - - )); -DATA(insert OID = 639 ( "~" PGUID 0 b t f 19 25 16 0 640 0 0 nameregexeq regexeqsel regexeqjoinsel )); +DATA(insert OID = 639 ( "~" PGNSP PGUID 0 b t f 19 25 16 0 640 0 0 0 0 nameregexeq regexeqsel regexeqjoinsel )); #define OID_NAME_REGEXEQ_OP 639 -DATA(insert OID = 640 ( "!~" PGUID 0 b t f 19 25 16 0 639 0 0 nameregexne regexnesel regexnejoinsel )); -DATA(insert OID = 641 ( "~" PGUID 0 b t f 25 25 16 0 642 0 0 textregexeq regexeqsel regexeqjoinsel )); +DATA(insert OID = 640 ( "!~" PGNSP PGUID 0 b t f 19 25 16 0 639 0 0 0 0 nameregexne regexnesel regexnejoinsel )); +DATA(insert OID = 641 ( "~" PGNSP PGUID 0 b t f 25 25 16 0 642 0 0 0 0 textregexeq regexeqsel regexeqjoinsel )); #define OID_TEXT_REGEXEQ_OP 641 -DATA(insert OID = 642 ( "!~" PGUID 0 b t f 25 25 16 0 641 0 0 textregexne regexnesel regexnejoinsel )); -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 = 642 ( "!~" PGNSP PGUID 0 b t f 25 25 16 0 641 0 0 0 0 textregexne regexnesel regexnejoinsel )); +DATA(insert OID = 643 ( "<>" PGNSP PGUID 0 b t f 19 19 16 643 93 0 0 0 0 namene neqsel neqjoinsel )); +DATA(insert OID = 654 ( "||" PGNSP PGUID 0 b t f 25 25 25 0 0 0 0 0 0 textcat - - )); -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 = 660 ( "<" PGNSP PGUID 0 b t f 19 19 16 662 663 0 0 0 0 namelt scalarltsel scalarltjoinsel )); +DATA(insert OID = 661 ( "<=" PGNSP PGUID 0 b t f 19 19 16 663 662 0 0 0 0 namele scalarltsel scalarltjoinsel )); +DATA(insert OID = 662 ( ">" PGNSP PGUID 0 b t f 19 19 16 660 661 0 0 0 0 namegt scalargtsel scalargtjoinsel )); +DATA(insert OID = 663 ( ">=" PGNSP PGUID 0 b t f 19 19 16 661 660 0 0 0 0 namege scalargtsel scalargtjoinsel )); +DATA(insert OID = 664 ( "<" PGNSP PGUID 0 b t f 25 25 16 666 667 0 0 0 0 text_lt scalarltsel scalarltjoinsel )); +DATA(insert OID = 665 ( "<=" PGNSP PGUID 0 b t f 25 25 16 667 666 0 0 0 0 text_le scalarltsel scalarltjoinsel )); +DATA(insert OID = 666 ( ">" PGNSP PGUID 0 b t f 25 25 16 664 665 0 0 0 0 text_gt scalargtsel scalargtjoinsel )); +DATA(insert OID = 667 ( ">=" PGNSP PGUID 0 b t f 25 25 16 665 664 0 0 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 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 = 670 ( "=" PGNSP PGUID 0 b t f 701 701 16 670 671 672 672 672 674 float8eq eqsel eqjoinsel )); +DATA(insert OID = 671 ( "<>" PGNSP PGUID 0 b t f 701 701 16 671 670 0 0 0 0 float8ne neqsel neqjoinsel )); +DATA(insert OID = 672 ( "<" PGNSP PGUID 0 b t f 701 701 16 674 675 0 0 0 0 float8lt scalarltsel scalarltjoinsel )); +DATA(insert OID = 673 ( "<=" PGNSP PGUID 0 b t f 701 701 16 675 674 0 0 0 0 float8le scalarltsel scalarltjoinsel )); +DATA(insert OID = 674 ( ">" PGNSP PGUID 0 b t f 701 701 16 672 673 0 0 0 0 float8gt scalargtsel scalargtjoinsel )); +DATA(insert OID = 675 ( ">=" PGNSP PGUID 0 b t f 701 701 16 673 672 0 0 0 0 float8ge scalargtsel scalargtjoinsel )); -DATA(insert OID = 682 ( "@" PGUID 0 l t f 0 21 21 0 0 0 0 int2abs - - )); -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 - - )); -DATA(insert OID = 686 ( "*" PGUID 0 b t f 20 20 20 686 0 0 0 int8mul - - )); -DATA(insert OID = 687 ( "/" PGUID 0 b t f 20 20 20 0 0 0 0 int8div - - )); -DATA(insert OID = 688 ( "+" PGUID 0 b t f 20 23 20 692 0 0 0 int84pl - - )); -DATA(insert OID = 689 ( "-" PGUID 0 b t f 20 23 20 0 0 0 0 int84mi - - )); -DATA(insert OID = 690 ( "*" PGUID 0 b t f 20 23 20 694 0 0 0 int84mul - - )); -DATA(insert OID = 691 ( "/" PGUID 0 b t f 20 23 20 0 0 0 0 int84div - - )); -DATA(insert OID = 692 ( "+" PGUID 0 b t f 23 20 20 688 0 0 0 int48pl - - )); -DATA(insert OID = 693 ( "-" PGUID 0 b t f 23 20 20 0 0 0 0 int48mi - - )); -DATA(insert OID = 694 ( "*" PGUID 0 b t f 23 20 20 690 0 0 0 int48mul - - )); -DATA(insert OID = 695 ( "/" PGUID 0 b t f 23 20 20 0 0 0 0 int48div - - )); +DATA(insert OID = 682 ( "@" PGNSP PGUID 0 l t f 0 21 21 0 0 0 0 0 0 int2abs - - )); +DATA(insert OID = 684 ( "+" PGNSP PGUID 0 b t f 20 20 20 684 0 0 0 0 0 int8pl - - )); +DATA(insert OID = 685 ( "-" PGNSP PGUID 0 b t f 20 20 20 0 0 0 0 0 0 int8mi - - )); +DATA(insert OID = 686 ( "*" PGNSP PGUID 0 b t f 20 20 20 686 0 0 0 0 0 int8mul - - )); +DATA(insert OID = 687 ( "/" PGNSP PGUID 0 b t f 20 20 20 0 0 0 0 0 0 int8div - - )); +DATA(insert OID = 688 ( "+" PGNSP PGUID 0 b t f 20 23 20 692 0 0 0 0 0 int84pl - - )); +DATA(insert OID = 689 ( "-" PGNSP PGUID 0 b t f 20 23 20 0 0 0 0 0 0 int84mi - - )); +DATA(insert OID = 690 ( "*" PGNSP PGUID 0 b t f 20 23 20 694 0 0 0 0 0 int84mul - - )); +DATA(insert OID = 691 ( "/" PGNSP PGUID 0 b t f 20 23 20 0 0 0 0 0 0 int84div - - )); +DATA(insert OID = 692 ( "+" PGNSP PGUID 0 b t f 23 20 20 688 0 0 0 0 0 int48pl - - )); +DATA(insert OID = 693 ( "-" PGNSP PGUID 0 b t f 23 20 20 0 0 0 0 0 0 int48mi - - )); +DATA(insert OID = 694 ( "*" PGNSP PGUID 0 b t f 23 20 20 690 0 0 0 0 0 int48mul - - )); +DATA(insert OID = 695 ( "/" PGNSP PGUID 0 b t f 23 20 20 0 0 0 0 0 0 int48div - - )); -DATA(insert OID = 706 ( "<->" PGUID 0 b t f 603 603 701 706 0 0 0 box_distance - - )); -DATA(insert OID = 707 ( "<->" PGUID 0 b t f 602 602 701 707 0 0 0 path_distance - - )); -DATA(insert OID = 708 ( "<->" PGUID 0 b t f 628 628 701 708 0 0 0 line_distance - - )); -DATA(insert OID = 709 ( "<->" PGUID 0 b t f 601 601 701 709 0 0 0 lseg_distance - - )); -DATA(insert OID = 712 ( "<->" PGUID 0 b t f 604 604 701 712 0 0 0 poly_distance - - )); +DATA(insert OID = 706 ( "<->" PGNSP PGUID 0 b t f 603 603 701 706 0 0 0 0 0 box_distance - - )); +DATA(insert OID = 707 ( "<->" PGNSP PGUID 0 b t f 602 602 701 707 0 0 0 0 0 path_distance - - )); +DATA(insert OID = 708 ( "<->" PGNSP PGUID 0 b t f 628 628 701 708 0 0 0 0 0 line_distance - - )); +DATA(insert OID = 709 ( "<->" PGNSP PGUID 0 b t f 601 601 701 709 0 0 0 0 0 lseg_distance - - )); +DATA(insert OID = 712 ( "<->" PGNSP PGUID 0 b t f 604 604 701 712 0 0 0 0 0 poly_distance - - )); /* add translation/rotation/scaling operators for geometric types. - thomas 97/05/10 */ -DATA(insert OID = 731 ( "+" PGUID 0 b t f 600 600 600 731 0 0 0 point_add - - )); -DATA(insert OID = 732 ( "-" PGUID 0 b t f 600 600 600 0 0 0 0 point_sub - - )); -DATA(insert OID = 733 ( "*" PGUID 0 b t f 600 600 600 733 0 0 0 point_mul - - )); -DATA(insert OID = 734 ( "/" PGUID 0 b t f 600 600 600 0 0 0 0 point_div - - )); -DATA(insert OID = 735 ( "+" PGUID 0 b t f 602 602 602 735 0 0 0 path_add - - )); -DATA(insert OID = 736 ( "+" PGUID 0 b t f 602 600 602 0 0 0 0 path_add_pt - - )); -DATA(insert OID = 737 ( "-" PGUID 0 b t f 602 600 602 0 0 0 0 path_sub_pt - - )); -DATA(insert OID = 738 ( "*" PGUID 0 b t f 602 600 602 0 0 0 0 path_mul_pt - - )); -DATA(insert OID = 739 ( "/" PGUID 0 b t f 602 600 602 0 0 0 0 path_div_pt - - )); -DATA(insert OID = 755 ( "~" PGUID 0 b t f 602 600 16 512 0 0 0 path_contain_pt - - )); -DATA(insert OID = 756 ( "@" PGUID 0 b t f 600 604 16 757 0 0 0 pt_contained_poly - - )); -DATA(insert OID = 757 ( "~" PGUID 0 b t f 604 600 16 756 0 0 0 poly_contain_pt - - )); -DATA(insert OID = 758 ( "@" PGUID 0 b t f 600 718 16 759 0 0 0 pt_contained_circle - - )); -DATA(insert OID = 759 ( "~" PGUID 0 b t f 718 600 16 758 0 0 0 circle_contain_pt - - )); +DATA(insert OID = 731 ( "+" PGNSP PGUID 0 b t f 600 600 600 731 0 0 0 0 0 point_add - - )); +DATA(insert OID = 732 ( "-" PGNSP PGUID 0 b t f 600 600 600 0 0 0 0 0 0 point_sub - - )); +DATA(insert OID = 733 ( "*" PGNSP PGUID 0 b t f 600 600 600 733 0 0 0 0 0 point_mul - - )); +DATA(insert OID = 734 ( "/" PGNSP PGUID 0 b t f 600 600 600 0 0 0 0 0 0 point_div - - )); +DATA(insert OID = 735 ( "+" PGNSP PGUID 0 b t f 602 602 602 735 0 0 0 0 0 path_add - - )); +DATA(insert OID = 736 ( "+" PGNSP PGUID 0 b t f 602 600 602 0 0 0 0 0 0 path_add_pt - - )); +DATA(insert OID = 737 ( "-" PGNSP PGUID 0 b t f 602 600 602 0 0 0 0 0 0 path_sub_pt - - )); +DATA(insert OID = 738 ( "*" PGNSP PGUID 0 b t f 602 600 602 0 0 0 0 0 0 path_mul_pt - - )); +DATA(insert OID = 739 ( "/" PGNSP PGUID 0 b t f 602 600 602 0 0 0 0 0 0 path_div_pt - - )); +DATA(insert OID = 755 ( "~" PGNSP PGUID 0 b t f 602 600 16 512 0 0 0 0 0 path_contain_pt - - )); +DATA(insert OID = 756 ( "@" PGNSP PGUID 0 b t f 600 604 16 757 0 0 0 0 0 pt_contained_poly - - )); +DATA(insert OID = 757 ( "~" PGNSP PGUID 0 b t f 604 600 16 756 0 0 0 0 0 poly_contain_pt - - )); +DATA(insert OID = 758 ( "@" PGNSP PGUID 0 b t f 600 718 16 759 0 0 0 0 0 pt_contained_circle - - )); +DATA(insert OID = 759 ( "~" PGNSP PGUID 0 b t f 718 600 16 758 0 0 0 0 0 circle_contain_pt - - )); -DATA(insert OID = 773 ( "@" PGUID 0 l t f 0 23 23 0 0 0 0 int4abs - - )); +DATA(insert OID = 773 ( "@" PGNSP PGUID 0 l t f 0 23 23 0 0 0 0 0 0 int4abs - - )); /* 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 - - )); -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 - - )); -DATA(insert OID = 800 ( ">^" PGUID 0 b t f 603 603 16 0 0 0 0 box_above positionsel positionjoinsel )); -DATA(insert OID = 801 ( "<^" PGUID 0 b t f 603 603 16 0 0 0 0 box_below positionsel positionjoinsel )); -DATA(insert OID = 802 ( "?#" PGUID 0 b t f 603 603 16 0 0 0 0 box_overlap areasel areajoinsel )); -DATA(insert OID = 803 ( "#" PGUID 0 b t f 603 603 603 0 0 0 0 box_intersect - - )); -DATA(insert OID = 804 ( "+" PGUID 0 b t f 603 600 603 0 0 0 0 box_add - - )); -DATA(insert OID = 805 ( "-" PGUID 0 b t f 603 600 603 0 0 0 0 box_sub - - )); -DATA(insert OID = 806 ( "*" PGUID 0 b t f 603 600 603 0 0 0 0 box_mul - - )); -DATA(insert OID = 807 ( "/" PGUID 0 b t f 603 600 603 0 0 0 0 box_div - - )); -DATA(insert OID = 808 ( "?-" PGUID 0 b t f 600 600 16 808 0 0 0 point_horiz - - )); -DATA(insert OID = 809 ( "?|" PGUID 0 b t f 600 600 16 809 0 0 0 point_vert - - )); +DATA(insert OID = 792 ( "=" PGNSP PGUID 0 b t f 602 602 16 792 0 0 0 0 0 path_n_eq eqsel eqjoinsel )); +DATA(insert OID = 793 ( "<" PGNSP PGUID 0 b t f 602 602 16 794 0 0 0 0 0 path_n_lt - - )); +DATA(insert OID = 794 ( ">" PGNSP PGUID 0 b t f 602 602 16 793 0 0 0 0 0 path_n_gt - - )); +DATA(insert OID = 795 ( "<=" PGNSP PGUID 0 b t f 602 602 16 796 0 0 0 0 0 path_n_le - - )); +DATA(insert OID = 796 ( ">=" PGNSP PGUID 0 b t f 602 602 16 795 0 0 0 0 0 path_n_ge - - )); +DATA(insert OID = 797 ( "#" PGNSP PGUID 0 l t f 0 602 23 0 0 0 0 0 0 path_npoints - - )); +DATA(insert OID = 798 ( "?#" PGNSP PGUID 0 b t f 602 602 16 0 0 0 0 0 0 path_inter - - )); +DATA(insert OID = 799 ( "@-@" PGNSP PGUID 0 l t f 0 602 701 0 0 0 0 0 0 path_length - - )); +DATA(insert OID = 800 ( ">^" PGNSP PGUID 0 b t f 603 603 16 0 0 0 0 0 0 box_above positionsel positionjoinsel )); +DATA(insert OID = 801 ( "<^" PGNSP PGUID 0 b t f 603 603 16 0 0 0 0 0 0 box_below positionsel positionjoinsel )); +DATA(insert OID = 802 ( "?#" PGNSP PGUID 0 b t f 603 603 16 0 0 0 0 0 0 box_overlap areasel areajoinsel )); +DATA(insert OID = 803 ( "#" PGNSP PGUID 0 b t f 603 603 603 0 0 0 0 0 0 box_intersect - - )); +DATA(insert OID = 804 ( "+" PGNSP PGUID 0 b t f 603 600 603 0 0 0 0 0 0 box_add - - )); +DATA(insert OID = 805 ( "-" PGNSP PGUID 0 b t f 603 600 603 0 0 0 0 0 0 box_sub - - )); +DATA(insert OID = 806 ( "*" PGNSP PGUID 0 b t f 603 600 603 0 0 0 0 0 0 box_mul - - )); +DATA(insert OID = 807 ( "/" PGNSP PGUID 0 b t f 603 600 603 0 0 0 0 0 0 box_div - - )); +DATA(insert OID = 808 ( "?-" PGNSP PGUID 0 b t f 600 600 16 808 0 0 0 0 0 point_horiz - - )); +DATA(insert OID = 809 ( "?|" PGNSP PGUID 0 b t f 600 600 16 809 0 0 0 0 0 point_vert - - )); -DATA(insert OID = 811 ( "=" PGUID 0 b t f 704 704 16 811 812 0 0 tintervaleq eqsel eqjoinsel )); -DATA(insert OID = 812 ( "<>" PGUID 0 b t f 704 704 16 812 811 0 0 tintervalne neqsel neqjoinsel )); -DATA(insert OID = 813 ( "<" PGUID 0 b t f 704 704 16 814 816 0 0 tintervallt scalarltsel scalarltjoinsel )); -DATA(insert OID = 814 ( ">" PGUID 0 b t f 704 704 16 813 815 0 0 tintervalgt scalargtsel scalargtjoinsel )); -DATA(insert OID = 815 ( "<=" PGUID 0 b t f 704 704 16 816 814 0 0 tintervalle scalarltsel scalarltjoinsel )); -DATA(insert OID = 816 ( ">=" PGUID 0 b t f 704 704 16 815 813 0 0 tintervalge scalargtsel scalargtjoinsel )); +DATA(insert OID = 811 ( "=" PGNSP PGUID 0 b t f 704 704 16 811 812 0 0 0 0 tintervaleq eqsel eqjoinsel )); +DATA(insert OID = 812 ( "<>" PGNSP PGUID 0 b t f 704 704 16 812 811 0 0 0 0 tintervalne neqsel neqjoinsel )); +DATA(insert OID = 813 ( "<" PGNSP PGUID 0 b t f 704 704 16 814 816 0 0 0 0 tintervallt scalarltsel scalarltjoinsel )); +DATA(insert OID = 814 ( ">" PGNSP PGUID 0 b t f 704 704 16 813 815 0 0 0 0 tintervalgt scalargtsel scalargtjoinsel )); +DATA(insert OID = 815 ( "<=" PGNSP PGUID 0 b t f 704 704 16 816 814 0 0 0 0 tintervalle scalarltsel scalarltjoinsel )); +DATA(insert OID = 816 ( ">=" PGNSP PGUID 0 b t f 704 704 16 815 813 0 0 0 0 tintervalge 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 - - )); -DATA(insert OID = 845 ( "*" PGUID 0 b t f 700 790 790 843 0 0 0 flt4_mul_cash - - )); +DATA(insert OID = 843 ( "*" PGNSP PGUID 0 b t f 790 700 790 845 0 0 0 0 0 cash_mul_flt4 - - )); +DATA(insert OID = 844 ( "/" PGNSP PGUID 0 b t f 790 700 790 0 0 0 0 0 0 cash_div_flt4 - - )); +DATA(insert OID = 845 ( "*" PGNSP PGUID 0 b t f 700 790 790 843 0 0 0 0 0 flt4_mul_cash - - )); -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 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 - - )); -DATA(insert OID = 909 ( "/" PGUID 0 b t f 790 701 790 0 0 0 0 cash_div_flt8 - - )); -DATA(insert OID = 912 ( "*" PGUID 0 b t f 790 23 790 917 0 0 0 cash_mul_int4 - - )); -DATA(insert OID = 913 ( "/" PGUID 0 b t f 790 23 790 0 0 0 0 cash_div_int4 - - )); -DATA(insert OID = 914 ( "*" PGUID 0 b t f 790 21 790 918 0 0 0 cash_mul_int2 - - )); -DATA(insert OID = 915 ( "/" PGUID 0 b t f 790 21 790 0 0 0 0 cash_div_int2 - - )); -DATA(insert OID = 916 ( "*" PGUID 0 b t f 701 790 790 908 0 0 0 flt8_mul_cash - - )); -DATA(insert OID = 917 ( "*" PGUID 0 b t f 23 790 790 912 0 0 0 int4_mul_cash - - )); -DATA(insert OID = 918 ( "*" PGUID 0 b t f 21 790 790 914 0 0 0 int2_mul_cash - - )); +DATA(insert OID = 900 ( "=" PGNSP PGUID 0 b t t 790 790 16 900 901 902 902 902 903 cash_eq eqsel eqjoinsel )); +DATA(insert OID = 901 ( "<>" PGNSP PGUID 0 b t f 790 790 16 901 900 0 0 0 0 cash_ne neqsel neqjoinsel )); +DATA(insert OID = 902 ( "<" PGNSP PGUID 0 b t f 790 790 16 903 905 0 0 0 0 cash_lt scalarltsel scalarltjoinsel )); +DATA(insert OID = 903 ( ">" PGNSP PGUID 0 b t f 790 790 16 902 904 0 0 0 0 cash_gt scalargtsel scalargtjoinsel )); +DATA(insert OID = 904 ( "<=" PGNSP PGUID 0 b t f 790 790 16 905 903 0 0 0 0 cash_le scalarltsel scalarltjoinsel )); +DATA(insert OID = 905 ( ">=" PGNSP PGUID 0 b t f 790 790 16 904 902 0 0 0 0 cash_ge scalargtsel scalargtjoinsel )); +DATA(insert OID = 906 ( "+" PGNSP PGUID 0 b t f 790 790 790 906 0 0 0 0 0 cash_pl - - )); +DATA(insert OID = 907 ( "-" PGNSP PGUID 0 b t f 790 790 790 0 0 0 0 0 0 cash_mi - - )); +DATA(insert OID = 908 ( "*" PGNSP PGUID 0 b t f 790 701 790 916 0 0 0 0 0 cash_mul_flt8 - - )); +DATA(insert OID = 909 ( "/" PGNSP PGUID 0 b t f 790 701 790 0 0 0 0 0 0 cash_div_flt8 - - )); +DATA(insert OID = 912 ( "*" PGNSP PGUID 0 b t f 790 23 790 917 0 0 0 0 0 cash_mul_int4 - - )); +DATA(insert OID = 913 ( "/" PGNSP PGUID 0 b t f 790 23 790 0 0 0 0 0 0 cash_div_int4 - - )); +DATA(insert OID = 914 ( "*" PGNSP PGUID 0 b t f 790 21 790 918 0 0 0 0 0 cash_mul_int2 - - )); +DATA(insert OID = 915 ( "/" PGNSP PGUID 0 b t f 790 21 790 0 0 0 0 0 0 cash_div_int2 - - )); +DATA(insert OID = 916 ( "*" PGNSP PGUID 0 b t f 701 790 790 908 0 0 0 0 0 flt8_mul_cash - - )); +DATA(insert OID = 917 ( "*" PGNSP PGUID 0 b t f 23 790 790 912 0 0 0 0 0 int4_mul_cash - - )); +DATA(insert OID = 918 ( "*" PGNSP PGUID 0 b t f 21 790 790 914 0 0 0 0 0 int2_mul_cash - - )); -DATA(insert OID = 965 ( "^" PGUID 0 b t f 701 701 701 0 0 0 0 dpow - - )); -DATA(insert OID = 966 ( "+" PGUID 0 b t f 1034 1033 1034 0 0 0 0 aclinsert - - )); -DATA(insert OID = 967 ( "-" PGUID 0 b t f 1034 1033 1034 0 0 0 0 aclremove - - )); -DATA(insert OID = 968 ( "~" PGUID 0 b t f 1034 1033 16 0 0 0 0 aclcontains - - )); +DATA(insert OID = 965 ( "^" PGNSP PGUID 0 b t f 701 701 701 0 0 0 0 0 0 dpow - - )); +DATA(insert OID = 966 ( "+" PGNSP PGUID 0 b t f 1034 1033 1034 0 0 0 0 0 0 aclinsert - - )); +DATA(insert OID = 967 ( "-" PGNSP PGUID 0 b t f 1034 1033 1034 0 0 0 0 0 0 aclremove - - )); +DATA(insert OID = 968 ( "~" PGNSP PGUID 0 b t f 1034 1033 16 0 0 0 0 0 0 aclcontains - - )); /* additional geometric operators - thomas 1997-07-09 */ -DATA(insert OID = 969 ( "@@" PGUID 0 l t f 0 601 600 0 0 0 0 lseg_center - - )); -DATA(insert OID = 970 ( "@@" PGUID 0 l t f 0 602 600 0 0 0 0 path_center - - )); -DATA(insert OID = 971 ( "@@" PGUID 0 l t f 0 604 600 0 0 0 0 poly_center - - )); +DATA(insert OID = 969 ( "@@" PGNSP PGUID 0 l t f 0 601 600 0 0 0 0 0 0 lseg_center - - )); +DATA(insert OID = 970 ( "@@" PGNSP PGUID 0 l t f 0 602 600 0 0 0 0 0 0 path_center - - )); +DATA(insert OID = 971 ( "@@" PGNSP PGUID 0 l t f 0 604 600 0 0 0 0 0 0 poly_center - - )); -DATA(insert OID = 974 ( "||" PGUID 0 b t f 1042 1042 1042 0 0 0 0 textcat - - )); -DATA(insert OID = 979 ( "||" PGUID 0 b t f 1043 1043 1043 0 0 0 0 textcat - - )); +DATA(insert OID = 974 ( "||" PGNSP PGUID 0 b t f 1042 1042 1042 0 0 0 0 0 0 textcat - - )); +DATA(insert OID = 979 ( "||" PGNSP PGUID 0 b t f 1043 1043 1043 0 0 0 0 0 0 textcat - - )); -DATA(insert OID = 1054 ( "=" PGUID 0 b t f 1042 1042 16 1054 1057 1058 1058 bpchareq eqsel eqjoinsel )); -DATA(insert OID = 1055 ( "~" PGUID 0 b t f 1042 25 16 0 1056 0 0 textregexeq regexeqsel regexeqjoinsel )); +DATA(insert OID = 1054 ( "=" PGNSP PGUID 0 b t f 1042 1042 16 1054 1057 1058 1058 1058 1060 bpchareq eqsel eqjoinsel )); +DATA(insert OID = 1055 ( "~" PGNSP PGUID 0 b t f 1042 25 16 0 1056 0 0 0 0 textregexeq regexeqsel regexeqjoinsel )); #define OID_BPCHAR_REGEXEQ_OP 1055 -DATA(insert OID = 1056 ( "!~" PGUID 0 b t f 1042 25 16 0 1055 0 0 textregexne regexnesel regexnejoinsel )); -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 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 = 1056 ( "!~" PGNSP PGUID 0 b t f 1042 25 16 0 1055 0 0 0 0 textregexne regexnesel regexnejoinsel )); +DATA(insert OID = 1057 ( "<>" PGNSP PGUID 0 b t f 1042 1042 16 1057 1054 0 0 0 0 bpcharne neqsel neqjoinsel )); +DATA(insert OID = 1058 ( "<" PGNSP PGUID 0 b t f 1042 1042 16 1060 1061 0 0 0 0 bpcharlt scalarltsel scalarltjoinsel )); +DATA(insert OID = 1059 ( "<=" PGNSP PGUID 0 b t f 1042 1042 16 1061 1060 0 0 0 0 bpcharle scalarltsel scalarltjoinsel )); +DATA(insert OID = 1060 ( ">" PGNSP PGUID 0 b t f 1042 1042 16 1058 1059 0 0 0 0 bpchargt scalargtsel scalargtjoinsel )); +DATA(insert OID = 1061 ( ">=" PGNSP PGUID 0 b t f 1042 1042 16 1059 1058 0 0 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 regexeqsel regexeqjoinsel )); +DATA(insert OID = 1062 ( "=" PGNSP PGUID 0 b t t 1043 1043 16 1062 1065 1066 1066 1066 1068 varchareq eqsel eqjoinsel )); +DATA(insert OID = 1063 ( "~" PGNSP PGUID 0 b t f 1043 25 16 0 1064 0 0 0 0 textregexeq regexeqsel regexeqjoinsel )); #define OID_VARCHAR_REGEXEQ_OP 1063 -DATA(insert OID = 1064 ( "!~" PGUID 0 b t f 1043 25 16 0 1063 0 0 textregexne regexnesel regexnejoinsel )); -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 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 )); +DATA(insert OID = 1064 ( "!~" PGNSP PGUID 0 b t f 1043 25 16 0 1063 0 0 0 0 textregexne regexnesel regexnejoinsel )); +DATA(insert OID = 1065 ( "<>" PGNSP PGUID 0 b t f 1043 1043 16 1065 1062 0 0 0 0 varcharne neqsel neqjoinsel )); +DATA(insert OID = 1066 ( "<" PGNSP PGUID 0 b t f 1043 1043 16 1068 1069 0 0 0 0 varcharlt scalarltsel scalarltjoinsel )); +DATA(insert OID = 1067 ( "<=" PGNSP PGUID 0 b t f 1043 1043 16 1069 1068 0 0 0 0 varcharle scalarltsel scalarltjoinsel )); +DATA(insert OID = 1068 ( ">" PGNSP PGUID 0 b t f 1043 1043 16 1066 1067 0 0 0 0 varchargt scalargtsel scalargtjoinsel )); +DATA(insert OID = 1069 ( ">=" PGNSP PGUID 0 b t f 1043 1043 16 1067 1066 0 0 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 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 - - )); +DATA(insert OID = 1093 ( "=" PGNSP PGUID 0 b t t 1082 1082 16 1093 1094 1095 1095 1095 1097 date_eq eqsel eqjoinsel )); +DATA(insert OID = 1094 ( "<>" PGNSP PGUID 0 b t f 1082 1082 16 1094 1093 0 0 0 0 date_ne neqsel neqjoinsel )); +DATA(insert OID = 1095 ( "<" PGNSP PGUID 0 b t f 1082 1082 16 1097 1098 0 0 0 0 date_lt scalarltsel scalarltjoinsel )); +DATA(insert OID = 1096 ( "<=" PGNSP PGUID 0 b t f 1082 1082 16 1098 1097 0 0 0 0 date_le scalarltsel scalarltjoinsel )); +DATA(insert OID = 1097 ( ">" PGNSP PGUID 0 b t f 1082 1082 16 1095 1096 0 0 0 0 date_gt scalargtsel scalargtjoinsel )); +DATA(insert OID = 1098 ( ">=" PGNSP PGUID 0 b t f 1082 1082 16 1096 1095 0 0 0 0 date_ge scalargtsel scalargtjoinsel )); +DATA(insert OID = 1099 ( "-" PGNSP PGUID 0 b t f 1082 1082 23 0 0 0 0 0 0 date_mi - - )); +DATA(insert OID = 1100 ( "+" PGNSP PGUID 0 b t f 1082 23 1082 0 0 0 0 0 0 date_pli - - )); +DATA(insert OID = 1101 ( "-" PGNSP PGUID 0 b t f 1082 23 1082 0 0 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 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 )); -DATA(insert OID = 1269 ( "-" PGUID 0 b t f 1186 1083 1083 0 0 0 0 interval_mi_time - - )); +DATA(insert OID = 1108 ( "=" PGNSP PGUID 0 b t f 1083 1083 16 1108 1109 1110 1110 1110 1112 time_eq eqsel eqjoinsel )); +DATA(insert OID = 1109 ( "<>" PGNSP PGUID 0 b t f 1083 1083 16 1109 1108 0 0 0 0 time_ne neqsel neqjoinsel )); +DATA(insert OID = 1110 ( "<" PGNSP PGUID 0 b t f 1083 1083 16 1112 1113 0 0 0 0 time_lt scalarltsel scalarltjoinsel )); +DATA(insert OID = 1111 ( "<=" PGNSP PGUID 0 b t f 1083 1083 16 1113 1112 0 0 0 0 time_le scalarltsel scalarltjoinsel )); +DATA(insert OID = 1112 ( ">" PGNSP PGUID 0 b t f 1083 1083 16 1110 1111 0 0 0 0 time_gt scalargtsel scalargtjoinsel )); +DATA(insert OID = 1113 ( ">=" PGNSP PGUID 0 b t f 1083 1083 16 1111 1110 0 0 0 0 time_ge scalargtsel scalargtjoinsel )); +DATA(insert OID = 1269 ( "-" PGNSP PGUID 0 b t f 1186 1083 1083 0 0 0 0 0 0 interval_mi_time - - )); /* timetz operators */ -DATA(insert OID = 1295 ( "-" PGUID 0 b t f 1186 1266 1266 0 0 0 0 interval_mi_timetz - - )); -DATA(insert OID = 1550 ( "=" PGUID 0 b t f 1266 1266 16 1550 1551 1552 1552 timetz_eq eqsel eqjoinsel )); -DATA(insert OID = 1551 ( "<>" PGUID 0 b t f 1266 1266 16 1551 1550 0 0 timetz_ne neqsel neqjoinsel )); -DATA(insert OID = 1552 ( "<" PGUID 0 b t f 1266 1266 16 1554 1555 0 0 timetz_lt scalarltsel scalarltjoinsel )); -DATA(insert OID = 1553 ( "<=" PGUID 0 b t f 1266 1266 16 1555 1554 0 0 timetz_le scalarltsel scalarltjoinsel )); -DATA(insert OID = 1554 ( ">" PGUID 0 b t f 1266 1266 16 1552 1553 0 0 timetz_gt scalargtsel scalargtjoinsel )); -DATA(insert OID = 1555 ( ">=" PGUID 0 b t f 1266 1266 16 1553 1552 0 0 timetz_ge scalargtsel scalargtjoinsel )); +DATA(insert OID = 1295 ( "-" PGNSP PGUID 0 b t f 1186 1266 1266 0 0 0 0 0 0 interval_mi_timetz - - )); +DATA(insert OID = 1550 ( "=" PGNSP PGUID 0 b t f 1266 1266 16 1550 1551 1552 1552 1552 1554 timetz_eq eqsel eqjoinsel )); +DATA(insert OID = 1551 ( "<>" PGNSP PGUID 0 b t f 1266 1266 16 1551 1550 0 0 0 0 timetz_ne neqsel neqjoinsel )); +DATA(insert OID = 1552 ( "<" PGNSP PGUID 0 b t f 1266 1266 16 1554 1555 0 0 0 0 timetz_lt scalarltsel scalarltjoinsel )); +DATA(insert OID = 1553 ( "<=" PGNSP PGUID 0 b t f 1266 1266 16 1555 1554 0 0 0 0 timetz_le scalarltsel scalarltjoinsel )); +DATA(insert OID = 1554 ( ">" PGNSP PGUID 0 b t f 1266 1266 16 1552 1553 0 0 0 0 timetz_gt scalargtsel scalargtjoinsel )); +DATA(insert OID = 1555 ( ">=" PGNSP PGUID 0 b t f 1266 1266 16 1553 1552 0 0 0 0 timetz_ge scalargtsel scalargtjoinsel )); /* float48 operators */ -DATA(insert OID = 1116 ( "+" PGUID 0 b t f 700 701 701 1126 0 0 0 float48pl - - )); -DATA(insert OID = 1117 ( "-" PGUID 0 b t f 700 701 701 0 0 0 0 float48mi - - )); -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 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 )); +DATA(insert OID = 1116 ( "+" PGNSP PGUID 0 b t f 700 701 701 1126 0 0 0 0 0 float48pl - - )); +DATA(insert OID = 1117 ( "-" PGNSP PGUID 0 b t f 700 701 701 0 0 0 0 0 0 float48mi - - )); +DATA(insert OID = 1118 ( "/" PGNSP PGUID 0 b t f 700 701 701 0 0 0 0 0 0 float48div - - )); +DATA(insert OID = 1119 ( "*" PGNSP PGUID 0 b t f 700 701 701 1129 0 0 0 0 0 float48mul - - )); +DATA(insert OID = 1120 ( "=" PGNSP PGUID 0 b t f 700 701 16 1130 1121 622 672 1122 1123 float48eq eqsel eqjoinsel )); +DATA(insert OID = 1121 ( "<>" PGNSP PGUID 0 b t f 700 701 16 1131 1120 0 0 0 0 float48ne neqsel neqjoinsel )); +DATA(insert OID = 1122 ( "<" PGNSP PGUID 0 b t f 700 701 16 1133 1125 0 0 0 0 float48lt scalarltsel scalarltjoinsel )); +DATA(insert OID = 1123 ( ">" PGNSP PGUID 0 b t f 700 701 16 1132 1124 0 0 0 0 float48gt scalargtsel scalargtjoinsel )); +DATA(insert OID = 1124 ( "<=" PGNSP PGUID 0 b t f 700 701 16 1135 1123 0 0 0 0 float48le scalarltsel scalarltjoinsel )); +DATA(insert OID = 1125 ( ">=" PGNSP PGUID 0 b t f 700 701 16 1134 1122 0 0 0 0 float48ge scalargtsel scalargtjoinsel )); /* float84 operators */ -DATA(insert OID = 1126 ( "+" PGUID 0 b t f 701 700 701 1116 0 0 0 float84pl - - )); -DATA(insert OID = 1127 ( "-" PGUID 0 b t f 701 700 701 0 0 0 0 float84mi - - )); -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 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 )); +DATA(insert OID = 1126 ( "+" PGNSP PGUID 0 b t f 701 700 701 1116 0 0 0 0 0 float84pl - - )); +DATA(insert OID = 1127 ( "-" PGNSP PGUID 0 b t f 701 700 701 0 0 0 0 0 0 float84mi - - )); +DATA(insert OID = 1128 ( "/" PGNSP PGUID 0 b t f 701 700 701 0 0 0 0 0 0 float84div - - )); +DATA(insert OID = 1129 ( "*" PGNSP PGUID 0 b t f 701 700 701 1119 0 0 0 0 0 float84mul - - )); +DATA(insert OID = 1130 ( "=" PGNSP PGUID 0 b t f 701 700 16 1120 1131 672 622 1132 1133 float84eq eqsel eqjoinsel )); +DATA(insert OID = 1131 ( "<>" PGNSP PGUID 0 b t f 701 700 16 1121 1130 0 0 0 0 float84ne neqsel neqjoinsel )); +DATA(insert OID = 1132 ( "<" PGNSP PGUID 0 b t f 701 700 16 1123 1135 0 0 0 0 float84lt scalarltsel scalarltjoinsel )); +DATA(insert OID = 1133 ( ">" PGNSP PGUID 0 b t f 701 700 16 1122 1134 0 0 0 0 float84gt scalargtsel scalargtjoinsel )); +DATA(insert OID = 1134 ( "<=" PGNSP PGUID 0 b t f 701 700 16 1125 1133 0 0 0 0 float84le scalarltsel scalarltjoinsel )); +DATA(insert OID = 1135 ( ">=" PGNSP PGUID 0 b t f 701 700 16 1124 1132 0 0 0 0 float84ge scalargtsel scalargtjoinsel )); /* int4 vs oid equality --- use oid (unsigned) comparison */ -DATA(insert OID = 1136 ( "=" PGUID 0 b t t 23 26 16 1137 1656 0 0 oideq eqsel eqjoinsel )); -DATA(insert OID = 1137 ( "=" PGUID 0 b t t 26 23 16 1136 1661 0 0 oideq eqsel eqjoinsel )); +DATA(insert OID = 1136 ( "=" PGNSP PGUID 0 b t t 23 26 16 1137 1656 0 0 0 0 oideq eqsel eqjoinsel )); +DATA(insert OID = 1137 ( "=" PGNSP PGUID 0 b t t 26 23 16 1136 1661 0 0 0 0 oideq eqsel eqjoinsel )); -DATA(insert OID = 1158 ( "!" PGUID 0 r t f 21 0 23 0 0 0 0 int2fac - - )); -DATA(insert OID = 1175 ( "!!" PGUID 0 l t f 0 21 23 0 0 0 0 int2fac - - )); +DATA(insert OID = 1158 ( "!" PGNSP PGUID 0 r t f 21 0 23 0 0 0 0 0 0 int2fac - - )); +DATA(insert OID = 1175 ( "!!" PGNSP PGUID 0 l t f 0 21 23 0 0 0 0 0 0 int2fac - - )); /* LIKE hacks by Keith Parks. */ -DATA(insert OID = 1207 ( "~~" PGUID 0 b t f 19 25 16 0 1208 0 0 namelike likesel likejoinsel )); +DATA(insert OID = 1207 ( "~~" PGNSP PGUID 0 b t f 19 25 16 0 1208 0 0 0 0 namelike likesel likejoinsel )); #define OID_NAME_LIKE_OP 1207 -DATA(insert OID = 1208 ( "!~~" PGUID 0 b t f 19 25 16 0 1207 0 0 namenlike nlikesel nlikejoinsel )); -DATA(insert OID = 1209 ( "~~" PGUID 0 b t f 25 25 16 0 1210 0 0 textlike likesel likejoinsel )); +DATA(insert OID = 1208 ( "!~~" PGNSP PGUID 0 b t f 19 25 16 0 1207 0 0 0 0 namenlike nlikesel nlikejoinsel )); +DATA(insert OID = 1209 ( "~~" PGNSP PGUID 0 b t f 25 25 16 0 1210 0 0 0 0 textlike likesel likejoinsel )); #define OID_TEXT_LIKE_OP 1209 -DATA(insert OID = 1210 ( "!~~" PGUID 0 b t f 25 25 16 0 1209 0 0 textnlike nlikesel nlikejoinsel )); -DATA(insert OID = 1211 ( "~~" PGUID 0 b t f 1042 25 16 0 1212 0 0 textlike likesel likejoinsel )); +DATA(insert OID = 1210 ( "!~~" PGNSP PGUID 0 b t f 25 25 16 0 1209 0 0 0 0 textnlike nlikesel nlikejoinsel )); +DATA(insert OID = 1211 ( "~~" PGNSP PGUID 0 b t f 1042 25 16 0 1212 0 0 0 0 textlike likesel likejoinsel )); #define OID_BPCHAR_LIKE_OP 1211 -DATA(insert OID = 1212 ( "!~~" PGUID 0 b t f 1042 25 16 0 1211 0 0 textnlike nlikesel nlikejoinsel )); -DATA(insert OID = 1213 ( "~~" PGUID 0 b t f 1043 25 16 0 1214 0 0 textlike likesel likejoinsel )); +DATA(insert OID = 1212 ( "!~~" PGNSP PGUID 0 b t f 1042 25 16 0 1211 0 0 0 0 textnlike nlikesel nlikejoinsel )); +DATA(insert OID = 1213 ( "~~" PGNSP PGUID 0 b t f 1043 25 16 0 1214 0 0 0 0 textlike likesel likejoinsel )); #define OID_VARCHAR_LIKE_OP 1213 -DATA(insert OID = 1214 ( "!~~" PGUID 0 b t f 1043 25 16 0 1213 0 0 textnlike nlikesel nlikejoinsel )); +DATA(insert OID = 1214 ( "!~~" PGNSP PGUID 0 b t f 1043 25 16 0 1213 0 0 0 0 textnlike nlikesel nlikejoinsel )); /* case-insensitive regex hacks */ -DATA(insert OID = 1226 ( "~*" PGUID 0 b t f 19 25 16 0 1227 0 0 nameicregexeq icregexeqsel icregexeqjoinsel )); +DATA(insert OID = 1226 ( "~*" PGNSP PGUID 0 b t f 19 25 16 0 1227 0 0 0 0 nameicregexeq icregexeqsel icregexeqjoinsel )); #define OID_NAME_ICREGEXEQ_OP 1226 -DATA(insert OID = 1227 ( "!~*" PGUID 0 b t f 19 25 16 0 1226 0 0 nameicregexne icregexnesel icregexnejoinsel )); -DATA(insert OID = 1228 ( "~*" PGUID 0 b t f 25 25 16 0 1229 0 0 texticregexeq icregexeqsel icregexeqjoinsel )); +DATA(insert OID = 1227 ( "!~*" PGNSP PGUID 0 b t f 19 25 16 0 1226 0 0 0 0 nameicregexne icregexnesel icregexnejoinsel )); +DATA(insert OID = 1228 ( "~*" PGNSP PGUID 0 b t f 25 25 16 0 1229 0 0 0 0 texticregexeq icregexeqsel icregexeqjoinsel )); #define OID_TEXT_ICREGEXEQ_OP 1228 -DATA(insert OID = 1229 ( "!~*" PGUID 0 b t f 25 25 16 0 1228 0 0 texticregexne icregexnesel icregexnejoinsel )); -DATA(insert OID = 1232 ( "~*" PGUID 0 b t f 1043 25 16 0 1233 0 0 texticregexeq icregexeqsel icregexeqjoinsel )); +DATA(insert OID = 1229 ( "!~*" PGNSP PGUID 0 b t f 25 25 16 0 1228 0 0 0 0 texticregexne icregexnesel icregexnejoinsel )); +DATA(insert OID = 1232 ( "~*" PGNSP PGUID 0 b t f 1043 25 16 0 1233 0 0 0 0 texticregexeq icregexeqsel icregexeqjoinsel )); #define OID_VARCHAR_ICREGEXEQ_OP 1232 -DATA(insert OID = 1233 ( "!~*" PGUID 0 b t f 1043 25 16 0 1232 0 0 texticregexne icregexnesel icregexnejoinsel )); -DATA(insert OID = 1234 ( "~*" PGUID 0 b t f 1042 25 16 0 1235 0 0 texticregexeq icregexeqsel icregexeqjoinsel )); +DATA(insert OID = 1233 ( "!~*" PGNSP PGUID 0 b t f 1043 25 16 0 1232 0 0 0 0 texticregexne icregexnesel icregexnejoinsel )); +DATA(insert OID = 1234 ( "~*" PGNSP PGUID 0 b t f 1042 25 16 0 1235 0 0 0 0 texticregexeq icregexeqsel icregexeqjoinsel )); #define OID_BPCHAR_ICREGEXEQ_OP 1234 -DATA(insert OID = 1235 ( "!~*" PGUID 0 b t f 1042 25 16 0 1234 0 0 texticregexne icregexnesel icregexnejoinsel )); +DATA(insert OID = 1235 ( "!~*" PGNSP PGUID 0 b t f 1042 25 16 0 1234 0 0 0 0 texticregexne icregexnesel icregexnejoinsel )); /* timestamptz 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 timestamp_eq eqsel eqjoinsel )); -DATA(insert OID = 1321 ( "<>" PGUID 0 b t f 1184 1184 16 1321 1320 0 0 timestamp_ne neqsel neqjoinsel )); -DATA(insert OID = 1322 ( "<" PGUID 0 b t f 1184 1184 16 1324 1325 0 0 timestamp_lt scalarltsel scalarltjoinsel )); -DATA(insert OID = 1323 ( "<=" PGUID 0 b t f 1184 1184 16 1325 1324 0 0 timestamp_le scalarltsel scalarltjoinsel )); -DATA(insert OID = 1324 ( ">" PGUID 0 b t f 1184 1184 16 1322 1323 0 0 timestamp_gt scalargtsel scalargtjoinsel )); -DATA(insert OID = 1325 ( ">=" PGUID 0 b t f 1184 1184 16 1323 1322 0 0 timestamp_ge scalargtsel scalargtjoinsel )); -DATA(insert OID = 1327 ( "+" PGUID 0 b t f 1184 1186 1184 0 0 0 0 timestamptz_pl_span - - )); -DATA(insert OID = 1328 ( "-" PGUID 0 b t f 1184 1184 1186 0 0 0 0 timestamptz_mi - - )); -DATA(insert OID = 1329 ( "-" PGUID 0 b t f 1184 1186 1184 0 0 0 0 timestamptz_mi_span - - )); +DATA(insert OID = 1320 ( "=" PGNSP PGUID 0 b t f 1184 1184 16 1320 1321 1322 1322 1322 1324 timestamp_eq eqsel eqjoinsel )); +DATA(insert OID = 1321 ( "<>" PGNSP PGUID 0 b t f 1184 1184 16 1321 1320 0 0 0 0 timestamp_ne neqsel neqjoinsel )); +DATA(insert OID = 1322 ( "<" PGNSP PGUID 0 b t f 1184 1184 16 1324 1325 0 0 0 0 timestamp_lt scalarltsel scalarltjoinsel )); +DATA(insert OID = 1323 ( "<=" PGNSP PGUID 0 b t f 1184 1184 16 1325 1324 0 0 0 0 timestamp_le scalarltsel scalarltjoinsel )); +DATA(insert OID = 1324 ( ">" PGNSP PGUID 0 b t f 1184 1184 16 1322 1323 0 0 0 0 timestamp_gt scalargtsel scalargtjoinsel )); +DATA(insert OID = 1325 ( ">=" PGNSP PGUID 0 b t f 1184 1184 16 1323 1322 0 0 0 0 timestamp_ge scalargtsel scalargtjoinsel )); +DATA(insert OID = 1327 ( "+" PGNSP PGUID 0 b t f 1184 1186 1184 0 0 0 0 0 0 timestamptz_pl_span - - )); +DATA(insert OID = 1328 ( "-" PGNSP PGUID 0 b t f 1184 1184 1186 0 0 0 0 0 0 timestamptz_mi - - )); +DATA(insert OID = 1329 ( "-" PGNSP PGUID 0 b t f 1184 1186 1184 0 0 0 0 0 0 timestamptz_mi_span - - )); /* interval operators */ -DATA(insert OID = 1330 ( "=" PGUID 0 b t f 1186 1186 16 1330 1331 1332 1332 interval_eq eqsel eqjoinsel )); -DATA(insert OID = 1331 ( "<>" PGUID 0 b t f 1186 1186 16 1331 1330 0 0 interval_ne neqsel neqjoinsel )); -DATA(insert OID = 1332 ( "<" PGUID 0 b t f 1186 1186 16 1334 1335 0 0 interval_lt scalarltsel scalarltjoinsel )); -DATA(insert OID = 1333 ( "<=" PGUID 0 b t f 1186 1186 16 1335 1334 0 0 interval_le scalarltsel scalarltjoinsel )); -DATA(insert OID = 1334 ( ">" PGUID 0 b t f 1186 1186 16 1332 1333 0 0 interval_gt scalargtsel scalargtjoinsel )); -DATA(insert OID = 1335 ( ">=" PGUID 0 b t f 1186 1186 16 1333 1332 0 0 interval_ge scalargtsel scalargtjoinsel )); +DATA(insert OID = 1330 ( "=" PGNSP PGUID 0 b t f 1186 1186 16 1330 1331 1332 1332 1332 1334 interval_eq eqsel eqjoinsel )); +DATA(insert OID = 1331 ( "<>" PGNSP PGUID 0 b t f 1186 1186 16 1331 1330 0 0 0 0 interval_ne neqsel neqjoinsel )); +DATA(insert OID = 1332 ( "<" PGNSP PGUID 0 b t f 1186 1186 16 1334 1335 0 0 0 0 interval_lt scalarltsel scalarltjoinsel )); +DATA(insert OID = 1333 ( "<=" PGNSP PGUID 0 b t f 1186 1186 16 1335 1334 0 0 0 0 interval_le scalarltsel scalarltjoinsel )); +DATA(insert OID = 1334 ( ">" PGNSP PGUID 0 b t f 1186 1186 16 1332 1333 0 0 0 0 interval_gt scalargtsel scalargtjoinsel )); +DATA(insert OID = 1335 ( ">=" PGNSP PGUID 0 b t f 1186 1186 16 1333 1332 0 0 0 0 interval_ge scalargtsel scalargtjoinsel )); -DATA(insert OID = 1336 ( "-" PGUID 0 l t f 0 1186 1186 0 0 0 0 interval_um - - )); -DATA(insert OID = 1337 ( "+" PGUID 0 b t f 1186 1186 1186 1337 0 0 0 interval_pl - - )); -DATA(insert OID = 1338 ( "-" PGUID 0 b t f 1186 1186 1186 0 0 0 0 interval_mi - - )); +DATA(insert OID = 1336 ( "-" PGNSP PGUID 0 l t f 0 1186 1186 0 0 0 0 0 0 interval_um - - )); +DATA(insert OID = 1337 ( "+" PGNSP PGUID 0 b t f 1186 1186 1186 1337 0 0 0 0 0 interval_pl - - )); +DATA(insert OID = 1338 ( "-" PGNSP PGUID 0 b t f 1186 1186 1186 0 0 0 0 0 0 interval_mi - - )); -DATA(insert OID = 1360 ( "+" PGUID 0 b t f 1082 1083 1114 0 0 0 0 datetime_pl - - )); -DATA(insert OID = 1361 ( "+" PGUID 0 b t f 1082 1266 1184 0 0 0 0 datetimetz_pl - - )); -DATA(insert OID = 1363 ( "+" PGUID 0 b t f 1083 1082 1114 0 0 0 0 timedate_pl - - )); -DATA(insert OID = 1366 ( "+" PGUID 0 b t f 1266 1082 1184 0 0 0 0 timetzdate_pl - - )); +DATA(insert OID = 1360 ( "+" PGNSP PGUID 0 b t f 1082 1083 1114 0 0 0 0 0 0 datetime_pl - - )); +DATA(insert OID = 1361 ( "+" PGNSP PGUID 0 b t f 1082 1266 1184 0 0 0 0 0 0 datetimetz_pl - - )); +DATA(insert OID = 1363 ( "+" PGNSP PGUID 0 b t f 1083 1082 1114 0 0 0 0 0 0 timedate_pl - - )); +DATA(insert OID = 1366 ( "+" PGNSP PGUID 0 b t f 1266 1082 1184 0 0 0 0 0 0 timetzdate_pl - - )); -DATA(insert OID = 1399 ( "-" PGUID 0 b t f 1083 1083 1186 0 0 0 0 time_mi_time - - )); +DATA(insert OID = 1399 ( "-" PGNSP PGUID 0 b t f 1083 1083 1186 0 0 0 0 0 0 time_mi_time - - )); /* additional geometric operators - thomas 97/04/18 */ -DATA(insert OID = 1420 ( "@@" PGUID 0 l t f 0 718 600 0 0 0 0 circle_center - - )); -DATA(insert OID = 1500 ( "=" PGUID 0 b t f 718 718 16 1500 1501 1502 1502 circle_eq eqsel eqjoinsel )); -DATA(insert OID = 1501 ( "<>" PGUID 0 b t f 718 718 16 1501 1500 0 0 circle_ne neqsel neqjoinsel )); -DATA(insert OID = 1502 ( "<" PGUID 0 b t f 718 718 16 1503 1505 0 0 circle_lt areasel areajoinsel )); -DATA(insert OID = 1503 ( ">" PGUID 0 b t f 718 718 16 1502 1504 0 0 circle_gt areasel areajoinsel )); -DATA(insert OID = 1504 ( "<=" PGUID 0 b t f 718 718 16 1505 1503 0 0 circle_le areasel areajoinsel )); -DATA(insert OID = 1505 ( ">=" PGUID 0 b t f 718 718 16 1504 1502 0 0 circle_ge areasel areajoinsel )); +DATA(insert OID = 1420 ( "@@" PGNSP PGUID 0 l t f 0 718 600 0 0 0 0 0 0 circle_center - - )); +DATA(insert OID = 1500 ( "=" PGNSP PGUID 0 b t f 718 718 16 1500 1501 1502 1502 1502 1503 circle_eq eqsel eqjoinsel )); +DATA(insert OID = 1501 ( "<>" PGNSP PGUID 0 b t f 718 718 16 1501 1500 0 0 0 0 circle_ne neqsel neqjoinsel )); +DATA(insert OID = 1502 ( "<" PGNSP PGUID 0 b t f 718 718 16 1503 1505 0 0 0 0 circle_lt areasel areajoinsel )); +DATA(insert OID = 1503 ( ">" PGNSP PGUID 0 b t f 718 718 16 1502 1504 0 0 0 0 circle_gt areasel areajoinsel )); +DATA(insert OID = 1504 ( "<=" PGNSP PGUID 0 b t f 718 718 16 1505 1503 0 0 0 0 circle_le areasel areajoinsel )); +DATA(insert OID = 1505 ( ">=" PGNSP PGUID 0 b t f 718 718 16 1504 1502 0 0 0 0 circle_ge areasel areajoinsel )); -DATA(insert OID = 1506 ( "<<" PGUID 0 b t f 718 718 16 0 0 0 0 circle_left positionsel positionjoinsel )); -DATA(insert OID = 1507 ( "&<" PGUID 0 b t f 718 718 16 0 0 0 0 circle_overleft positionsel positionjoinsel )); -DATA(insert OID = 1508 ( "&>" PGUID 0 b t f 718 718 16 0 0 0 0 circle_overright positionsel positionjoinsel )); -DATA(insert OID = 1509 ( ">>" PGUID 0 b t f 718 718 16 0 0 0 0 circle_right positionsel positionjoinsel )); -DATA(insert OID = 1510 ( "@" PGUID 0 b t f 718 718 16 1511 0 0 0 circle_contained contsel contjoinsel )); -DATA(insert OID = 1511 ( "~" PGUID 0 b t f 718 718 16 1510 0 0 0 circle_contain contsel contjoinsel )); -DATA(insert OID = 1512 ( "~=" PGUID 0 b t f 718 718 16 1512 0 0 0 circle_same eqsel eqjoinsel )); -DATA(insert OID = 1513 ( "&&" PGUID 0 b t f 718 718 16 1513 0 0 0 circle_overlap areasel areajoinsel )); -DATA(insert OID = 1514 ( ">^" PGUID 0 b t f 718 718 16 0 0 0 0 circle_above positionsel positionjoinsel )); -DATA(insert OID = 1515 ( "<^" PGUID 0 b t f 718 718 16 0 0 0 0 circle_below positionsel positionjoinsel )); +DATA(insert OID = 1506 ( "<<" PGNSP PGUID 0 b t f 718 718 16 0 0 0 0 0 0 circle_left positionsel positionjoinsel )); +DATA(insert OID = 1507 ( "&<" PGNSP PGUID 0 b t f 718 718 16 0 0 0 0 0 0 circle_overleft positionsel positionjoinsel )); +DATA(insert OID = 1508 ( "&>" PGNSP PGUID 0 b t f 718 718 16 0 0 0 0 0 0 circle_overright positionsel positionjoinsel )); +DATA(insert OID = 1509 ( ">>" PGNSP PGUID 0 b t f 718 718 16 0 0 0 0 0 0 circle_right positionsel positionjoinsel )); +DATA(insert OID = 1510 ( "@" PGNSP PGUID 0 b t f 718 718 16 1511 0 0 0 0 0 circle_contained contsel contjoinsel )); +DATA(insert OID = 1511 ( "~" PGNSP PGUID 0 b t f 718 718 16 1510 0 0 0 0 0 circle_contain contsel contjoinsel )); +DATA(insert OID = 1512 ( "~=" PGNSP PGUID 0 b t f 718 718 16 1512 0 0 0 0 0 circle_same eqsel eqjoinsel )); +DATA(insert OID = 1513 ( "&&" PGNSP PGUID 0 b t f 718 718 16 1513 0 0 0 0 0 circle_overlap areasel areajoinsel )); +DATA(insert OID = 1514 ( ">^" PGNSP PGUID 0 b t f 718 718 16 0 0 0 0 0 0 circle_above positionsel positionjoinsel )); +DATA(insert OID = 1515 ( "<^" PGNSP PGUID 0 b t f 718 718 16 0 0 0 0 0 0 circle_below positionsel positionjoinsel )); -DATA(insert OID = 1516 ( "+" PGUID 0 b t f 718 600 718 0 0 0 0 circle_add_pt - - )); -DATA(insert OID = 1517 ( "-" PGUID 0 b t f 718 600 718 0 0 0 0 circle_sub_pt - - )); -DATA(insert OID = 1518 ( "*" PGUID 0 b t f 718 600 718 0 0 0 0 circle_mul_pt - - )); -DATA(insert OID = 1519 ( "/" PGUID 0 b t f 718 600 718 0 0 0 0 circle_div_pt - - )); +DATA(insert OID = 1516 ( "+" PGNSP PGUID 0 b t f 718 600 718 0 0 0 0 0 0 circle_add_pt - - )); +DATA(insert OID = 1517 ( "-" PGNSP PGUID 0 b t f 718 600 718 0 0 0 0 0 0 circle_sub_pt - - )); +DATA(insert OID = 1518 ( "*" PGNSP PGUID 0 b t f 718 600 718 0 0 0 0 0 0 circle_mul_pt - - )); +DATA(insert OID = 1519 ( "/" PGNSP PGUID 0 b t f 718 600 718 0 0 0 0 0 0 circle_div_pt - - )); -DATA(insert OID = 1520 ( "<->" PGUID 0 b t f 718 718 701 1520 0 0 0 circle_distance - - )); -DATA(insert OID = 1521 ( "#" PGUID 0 l t f 0 604 23 0 0 0 0 poly_npoints - - )); -DATA(insert OID = 1522 ( "<->" PGUID 0 b t f 600 718 701 0 0 0 0 dist_pc - - )); -DATA(insert OID = 1523 ( "<->" PGUID 0 b t f 718 604 701 0 0 0 0 dist_cpoly - - )); +DATA(insert OID = 1520 ( "<->" PGNSP PGUID 0 b t f 718 718 701 1520 0 0 0 0 0 circle_distance - - )); +DATA(insert OID = 1521 ( "#" PGNSP PGUID 0 l t f 0 604 23 0 0 0 0 0 0 poly_npoints - - )); +DATA(insert OID = 1522 ( "<->" PGNSP PGUID 0 b t f 600 718 701 0 0 0 0 0 0 dist_pc - - )); +DATA(insert OID = 1523 ( "<->" PGNSP PGUID 0 b t f 718 604 701 0 0 0 0 0 0 dist_cpoly - - )); /* additional geometric operators - thomas 1997-07-09 */ -DATA(insert OID = 1524 ( "<->" PGUID 0 b t f 628 603 701 0 0 0 0 dist_lb - - )); +DATA(insert OID = 1524 ( "<->" PGNSP PGUID 0 b t f 628 603 701 0 0 0 0 0 0 dist_lb - - )); -DATA(insert OID = 1525 ( "?#" PGUID 0 b t f 601 601 16 1525 0 0 0 lseg_intersect - - )); -DATA(insert OID = 1526 ( "?||" PGUID 0 b t f 601 601 16 1526 0 0 0 lseg_parallel - - )); -DATA(insert OID = 1527 ( "?-|" PGUID 0 b t f 601 601 16 1527 0 0 0 lseg_perp - - )); -DATA(insert OID = 1528 ( "?-" PGUID 0 l t f 0 601 16 0 0 0 0 lseg_horizontal - - )); -DATA(insert OID = 1529 ( "?|" PGUID 0 l t f 0 601 16 0 0 0 0 lseg_vertical - - )); -DATA(insert OID = 1535 ( "=" PGUID 0 b t f 601 601 16 1535 1586 0 0 lseg_eq eqsel eqjoinsel )); -DATA(insert OID = 1536 ( "#" PGUID 0 b t f 601 601 600 1536 0 0 0 lseg_interpt - - )); -DATA(insert OID = 1537 ( "?#" PGUID 0 b t f 601 628 16 0 0 0 0 inter_sl - - )); -DATA(insert OID = 1538 ( "?#" PGUID 0 b t f 601 603 16 0 0 0 0 inter_sb - - )); -DATA(insert OID = 1539 ( "?#" PGUID 0 b t f 628 603 16 0 0 0 0 inter_lb - - )); +DATA(insert OID = 1525 ( "?#" PGNSP PGUID 0 b t f 601 601 16 1525 0 0 0 0 0 lseg_intersect - - )); +DATA(insert OID = 1526 ( "?||" PGNSP PGUID 0 b t f 601 601 16 1526 0 0 0 0 0 lseg_parallel - - )); +DATA(insert OID = 1527 ( "?-|" PGNSP PGUID 0 b t f 601 601 16 1527 0 0 0 0 0 lseg_perp - - )); +DATA(insert OID = 1528 ( "?-" PGNSP PGUID 0 l t f 0 601 16 0 0 0 0 0 0 lseg_horizontal - - )); +DATA(insert OID = 1529 ( "?|" PGNSP PGUID 0 l t f 0 601 16 0 0 0 0 0 0 lseg_vertical - - )); +DATA(insert OID = 1535 ( "=" PGNSP PGUID 0 b t f 601 601 16 1535 1586 0 0 0 0 lseg_eq eqsel eqjoinsel )); +DATA(insert OID = 1536 ( "#" PGNSP PGUID 0 b t f 601 601 600 1536 0 0 0 0 0 lseg_interpt - - )); +DATA(insert OID = 1537 ( "?#" PGNSP PGUID 0 b t f 601 628 16 0 0 0 0 0 0 inter_sl - - )); +DATA(insert OID = 1538 ( "?#" PGNSP PGUID 0 b t f 601 603 16 0 0 0 0 0 0 inter_sb - - )); +DATA(insert OID = 1539 ( "?#" PGNSP PGUID 0 b t f 628 603 16 0 0 0 0 0 0 inter_lb - - )); -DATA(insert OID = 1546 ( "@" PGUID 0 b t f 600 628 16 0 0 0 0 on_pl - - )); -DATA(insert OID = 1547 ( "@" PGUID 0 b t f 600 601 16 0 0 0 0 on_ps - - )); -DATA(insert OID = 1548 ( "@" PGUID 0 b t f 601 628 16 0 0 0 0 on_sl - - )); -DATA(insert OID = 1549 ( "@" PGUID 0 b t f 601 603 16 0 0 0 0 on_sb - - )); +DATA(insert OID = 1546 ( "@" PGNSP PGUID 0 b t f 600 628 16 0 0 0 0 0 0 on_pl - - )); +DATA(insert OID = 1547 ( "@" PGNSP PGUID 0 b t f 600 601 16 0 0 0 0 0 0 on_ps - - )); +DATA(insert OID = 1548 ( "@" PGNSP PGUID 0 b t f 601 628 16 0 0 0 0 0 0 on_sl - - )); +DATA(insert OID = 1549 ( "@" PGNSP PGUID 0 b t f 601 603 16 0 0 0 0 0 0 on_sb - - )); -DATA(insert OID = 1557 ( "##" PGUID 0 b t f 600 628 600 0 0 0 0 close_pl - - )); -DATA(insert OID = 1558 ( "##" PGUID 0 b t f 600 601 600 0 0 0 0 close_ps - - )); -DATA(insert OID = 1559 ( "##" PGUID 0 b t f 600 603 600 0 0 0 0 close_pb - - )); +DATA(insert OID = 1557 ( "##" PGNSP PGUID 0 b t f 600 628 600 0 0 0 0 0 0 close_pl - - )); +DATA(insert OID = 1558 ( "##" PGNSP PGUID 0 b t f 600 601 600 0 0 0 0 0 0 close_ps - - )); +DATA(insert OID = 1559 ( "##" PGNSP PGUID 0 b t f 600 603 600 0 0 0 0 0 0 close_pb - - )); -DATA(insert OID = 1566 ( "##" PGUID 0 b t f 601 628 600 0 0 0 0 close_sl - - )); -DATA(insert OID = 1567 ( "##" PGUID 0 b t f 601 603 600 0 0 0 0 close_sb - - )); -DATA(insert OID = 1568 ( "##" PGUID 0 b t f 628 603 600 0 0 0 0 close_lb - - )); -DATA(insert OID = 1577 ( "##" PGUID 0 b t f 628 601 600 0 0 0 0 close_ls - - )); -DATA(insert OID = 1578 ( "##" PGUID 0 b t f 601 601 600 0 0 0 0 close_lseg - - )); -DATA(insert OID = 1583 ( "*" PGUID 0 b t f 1186 701 1186 0 0 0 0 interval_mul - - )); -DATA(insert OID = 1584 ( "*" PGUID 0 b t f 701 1186 1186 0 0 0 0 mul_d_interval - - )); -DATA(insert OID = 1585 ( "/" PGUID 0 b t f 1186 701 1186 0 0 0 0 interval_div - - )); +DATA(insert OID = 1566 ( "##" PGNSP PGUID 0 b t f 601 628 600 0 0 0 0 0 0 close_sl - - )); +DATA(insert OID = 1567 ( "##" PGNSP PGUID 0 b t f 601 603 600 0 0 0 0 0 0 close_sb - - )); +DATA(insert OID = 1568 ( "##" PGNSP PGUID 0 b t f 628 603 600 0 0 0 0 0 0 close_lb - - )); +DATA(insert OID = 1577 ( "##" PGNSP PGUID 0 b t f 628 601 600 0 0 0 0 0 0 close_ls - - )); +DATA(insert OID = 1578 ( "##" PGNSP PGUID 0 b t f 601 601 600 0 0 0 0 0 0 close_lseg - - )); +DATA(insert OID = 1583 ( "*" PGNSP PGUID 0 b t f 1186 701 1186 0 0 0 0 0 0 interval_mul - - )); +DATA(insert OID = 1584 ( "*" PGNSP PGUID 0 b t f 701 1186 1186 0 0 0 0 0 0 mul_d_interval - - )); +DATA(insert OID = 1585 ( "/" PGNSP PGUID 0 b t f 1186 701 1186 0 0 0 0 0 0 interval_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 - - )); -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 = 1586 ( "<>" PGNSP PGUID 0 b t f 601 601 16 1586 1535 0 0 0 0 lseg_ne neqsel neqjoinsel )); +DATA(insert OID = 1587 ( "<" PGNSP PGUID 0 b t f 601 601 16 1589 1590 0 0 0 0 lseg_lt - - )); +DATA(insert OID = 1588 ( "<=" PGNSP PGUID 0 b t f 601 601 16 1590 1589 0 0 0 0 lseg_le - - )); +DATA(insert OID = 1589 ( ">" PGNSP PGUID 0 b t f 601 601 16 1587 1588 0 0 0 0 lseg_gt - - )); +DATA(insert OID = 1590 ( ">=" PGNSP PGUID 0 b t f 601 601 16 1588 1587 0 0 0 0 lseg_ge - - )); -DATA(insert OID = 1591 ( "@-@" PGUID 0 l t f 0 601 701 0 0 0 0 lseg_length - - )); +DATA(insert OID = 1591 ( "@-@" PGNSP PGUID 0 l t f 0 601 701 0 0 0 0 0 0 lseg_length - - )); -DATA(insert OID = 1611 ( "?#" PGUID 0 b t f 628 628 16 1611 0 0 0 line_intersect - - )); -DATA(insert OID = 1612 ( "?||" PGUID 0 b t f 628 628 16 1612 0 0 0 line_parallel - - )); -DATA(insert OID = 1613 ( "?-|" PGUID 0 b t f 628 628 16 1613 0 0 0 line_perp - - )); -DATA(insert OID = 1614 ( "?-" PGUID 0 l t f 0 628 16 0 0 0 0 line_horizontal - - )); -DATA(insert OID = 1615 ( "?|" PGUID 0 l t f 0 628 16 0 0 0 0 line_vertical - - )); -DATA(insert OID = 1616 ( "=" PGUID 0 b t f 628 628 16 1616 0 0 0 line_eq eqsel eqjoinsel )); -DATA(insert OID = 1617 ( "#" PGUID 0 b t f 628 628 600 1617 0 0 0 line_interpt - - )); +DATA(insert OID = 1611 ( "?#" PGNSP PGUID 0 b t f 628 628 16 1611 0 0 0 0 0 line_intersect - - )); +DATA(insert OID = 1612 ( "?||" PGNSP PGUID 0 b t f 628 628 16 1612 0 0 0 0 0 line_parallel - - )); +DATA(insert OID = 1613 ( "?-|" PGNSP PGUID 0 b t f 628 628 16 1613 0 0 0 0 0 line_perp - - )); +DATA(insert OID = 1614 ( "?-" PGNSP PGUID 0 l t f 0 628 16 0 0 0 0 0 0 line_horizontal - - )); +DATA(insert OID = 1615 ( "?|" PGNSP PGUID 0 l t f 0 628 16 0 0 0 0 0 0 line_vertical - - )); +DATA(insert OID = 1616 ( "=" PGNSP PGUID 0 b t f 628 628 16 1616 0 0 0 0 0 line_eq eqsel eqjoinsel )); +DATA(insert OID = 1617 ( "#" PGNSP PGUID 0 b t f 628 628 600 1617 0 0 0 0 0 line_interpt - - )); /* MAC type */ -DATA(insert OID = 1220 ( "=" PGUID 0 b t f 829 829 16 1220 1221 1222 1222 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 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 )); +DATA(insert OID = 1220 ( "=" PGNSP PGUID 0 b t f 829 829 16 1220 1221 1222 1222 1222 1224 macaddr_eq eqsel eqjoinsel )); +DATA(insert OID = 1221 ( "<>" PGNSP PGUID 0 b t f 829 829 16 1221 1220 0 0 0 0 macaddr_ne neqsel neqjoinsel )); +DATA(insert OID = 1222 ( "<" PGNSP PGUID 0 b t f 829 829 16 1224 1225 0 0 0 0 macaddr_lt scalarltsel scalarltjoinsel )); +DATA(insert OID = 1223 ( "<=" PGNSP PGUID 0 b t f 829 829 16 1225 1224 0 0 0 0 macaddr_le scalarltsel scalarltjoinsel )); +DATA(insert OID = 1224 ( ">" PGNSP PGUID 0 b t f 829 829 16 1222 1223 0 0 0 0 macaddr_gt scalargtsel scalargtjoinsel )); +DATA(insert OID = 1225 ( ">=" PGNSP PGUID 0 b t f 829 829 16 1223 1222 0 0 0 0 macaddr_ge scalargtsel scalargtjoinsel )); /* INET type */ -DATA(insert OID = 1201 ( "=" PGUID 0 b t f 869 869 16 1201 1202 1203 1203 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 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 0 0 0 network_sub - - )); +DATA(insert OID = 1201 ( "=" PGNSP PGUID 0 b t f 869 869 16 1201 1202 1203 1203 1203 1205 network_eq eqsel eqjoinsel )); +DATA(insert OID = 1202 ( "<>" PGNSP PGUID 0 b t f 869 869 16 1202 1201 0 0 0 0 network_ne neqsel neqjoinsel )); +DATA(insert OID = 1203 ( "<" PGNSP PGUID 0 b t f 869 869 16 1205 1206 0 0 0 0 network_lt scalarltsel scalarltjoinsel )); +DATA(insert OID = 1204 ( "<=" PGNSP PGUID 0 b t f 869 869 16 1206 1205 0 0 0 0 network_le scalarltsel scalarltjoinsel )); +DATA(insert OID = 1205 ( ">" PGNSP PGUID 0 b t f 869 869 16 1203 1204 0 0 0 0 network_gt scalargtsel scalargtjoinsel )); +DATA(insert OID = 1206 ( ">=" PGNSP PGUID 0 b t f 869 869 16 1204 1203 0 0 0 0 network_ge scalargtsel scalargtjoinsel )); +DATA(insert OID = 931 ( "<<" PGNSP PGUID 0 b t f 869 869 16 933 0 0 0 0 0 network_sub - - )); #define OID_INET_SUB_OP 931 -DATA(insert OID = 932 ( "<<=" PGUID 0 b t f 869 869 16 934 0 0 0 network_subeq - - )); +DATA(insert OID = 932 ( "<<=" PGNSP PGUID 0 b t f 869 869 16 934 0 0 0 0 0 network_subeq - - )); #define OID_INET_SUBEQ_OP 932 -DATA(insert OID = 933 ( ">>" PGUID 0 b t f 869 869 16 931 0 0 0 network_sup - - )); +DATA(insert OID = 933 ( ">>" PGNSP PGUID 0 b t f 869 869 16 931 0 0 0 0 0 network_sup - - )); #define OID_INET_SUP_OP 933 -DATA(insert OID = 934 ( ">>=" PGUID 0 b t f 869 869 16 932 0 0 0 network_supeq - - )); +DATA(insert OID = 934 ( ">>=" PGNSP PGUID 0 b t f 869 869 16 932 0 0 0 0 0 network_supeq - - )); #define OID_INET_SUPEQ_OP 934 /* CIDR type */ -DATA(insert OID = 820 ( "=" PGUID 0 b t f 650 650 16 820 821 822 822 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 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 0 0 0 network_sub - - )); +DATA(insert OID = 820 ( "=" PGNSP PGUID 0 b t f 650 650 16 820 821 822 822 822 824 network_eq eqsel eqjoinsel )); +DATA(insert OID = 821 ( "<>" PGNSP PGUID 0 b t f 650 650 16 821 820 0 0 0 0 network_ne neqsel neqjoinsel )); +DATA(insert OID = 822 ( "<" PGNSP PGUID 0 b t f 650 650 16 824 825 0 0 0 0 network_lt scalarltsel scalarltjoinsel )); +DATA(insert OID = 823 ( "<=" PGNSP PGUID 0 b t f 650 650 16 825 824 0 0 0 0 network_le scalarltsel scalarltjoinsel )); +DATA(insert OID = 824 ( ">" PGNSP PGUID 0 b t f 650 650 16 822 823 0 0 0 0 network_gt scalargtsel scalargtjoinsel )); +DATA(insert OID = 825 ( ">=" PGNSP PGUID 0 b t f 650 650 16 823 822 0 0 0 0 network_ge scalargtsel scalargtjoinsel )); +DATA(insert OID = 826 ( "<<" PGNSP PGUID 0 b t f 650 650 16 828 0 0 0 0 0 network_sub - - )); #define OID_CIDR_SUB_OP 826 -DATA(insert OID = 827 ( "<<=" PGUID 0 b t f 650 650 16 1004 0 0 0 network_subeq - - )); +DATA(insert OID = 827 ( "<<=" PGNSP PGUID 0 b t f 650 650 16 1004 0 0 0 0 0 network_subeq - - )); #define OID_CIDR_SUBEQ_OP 827 -DATA(insert OID = 828 ( ">>" PGUID 0 b t f 650 650 16 826 0 0 0 network_sup - - )); +DATA(insert OID = 828 ( ">>" PGNSP PGUID 0 b t f 650 650 16 826 0 0 0 0 0 network_sup - - )); #define OID_CIDR_SUP_OP 828 -DATA(insert OID = 1004 ( ">>=" PGUID 0 b t f 650 650 16 827 0 0 0 network_supeq - - )); +DATA(insert OID = 1004 ( ">>=" PGNSP PGUID 0 b t f 650 650 16 827 0 0 0 0 0 network_supeq - - )); #define OID_CIDR_SUPEQ_OP 1004 /* case-insensitive LIKE hacks */ -DATA(insert OID = 1625 ( "~~*" PGUID 0 b t f 19 25 16 0 1626 0 0 nameiclike iclikesel iclikejoinsel )); +DATA(insert OID = 1625 ( "~~*" PGNSP PGUID 0 b t f 19 25 16 0 1626 0 0 0 0 nameiclike iclikesel iclikejoinsel )); #define OID_NAME_ICLIKE_OP 1625 -DATA(insert OID = 1626 ( "!~~*" PGUID 0 b t f 19 25 16 0 1625 0 0 nameicnlike icnlikesel icnlikejoinsel )); -DATA(insert OID = 1627 ( "~~*" PGUID 0 b t f 25 25 16 0 1628 0 0 texticlike iclikesel iclikejoinsel )); +DATA(insert OID = 1626 ( "!~~*" PGNSP PGUID 0 b t f 19 25 16 0 1625 0 0 0 0 nameicnlike icnlikesel icnlikejoinsel )); +DATA(insert OID = 1627 ( "~~*" PGNSP PGUID 0 b t f 25 25 16 0 1628 0 0 0 0 texticlike iclikesel iclikejoinsel )); #define OID_TEXT_ICLIKE_OP 1627 -DATA(insert OID = 1628 ( "!~~*" PGUID 0 b t f 25 25 16 0 1627 0 0 texticnlike icnlikesel icnlikejoinsel )); -DATA(insert OID = 1629 ( "~~*" PGUID 0 b t f 1042 25 16 0 1630 0 0 texticlike iclikesel iclikejoinsel )); +DATA(insert OID = 1628 ( "!~~*" PGNSP PGUID 0 b t f 25 25 16 0 1627 0 0 0 0 texticnlike icnlikesel icnlikejoinsel )); +DATA(insert OID = 1629 ( "~~*" PGNSP PGUID 0 b t f 1042 25 16 0 1630 0 0 0 0 texticlike iclikesel iclikejoinsel )); #define OID_BPCHAR_ICLIKE_OP 1629 -DATA(insert OID = 1630 ( "!~~*" PGUID 0 b t f 1042 25 16 0 1629 0 0 texticnlike icnlikesel icnlikejoinsel )); -DATA(insert OID = 1631 ( "~~*" PGUID 0 b t f 1043 25 16 0 1632 0 0 texticlike iclikesel iclikejoinsel )); +DATA(insert OID = 1630 ( "!~~*" PGNSP PGUID 0 b t f 1042 25 16 0 1629 0 0 0 0 texticnlike icnlikesel icnlikejoinsel )); +DATA(insert OID = 1631 ( "~~*" PGNSP PGUID 0 b t f 1043 25 16 0 1632 0 0 0 0 texticlike iclikesel iclikejoinsel )); #define OID_VARCHAR_ICLIKE_OP 1631 -DATA(insert OID = 1632 ( "!~~*" PGUID 0 b t f 1043 25 16 0 1631 0 0 texticnlike icnlikesel icnlikejoinsel )); +DATA(insert OID = 1632 ( "!~~*" PGNSP PGUID 0 b t f 1043 25 16 0 1631 0 0 0 0 texticnlike icnlikesel icnlikejoinsel )); /* int4 vs oid comparisons --- use oid (unsigned) comparison */ -DATA(insert OID = 1656 ( "<>" PGUID 0 b t f 23 26 16 1661 1136 0 0 oidne neqsel neqjoinsel )); -DATA(insert OID = 1657 ( "<" PGUID 0 b t f 23 26 16 1663 1660 0 0 oidlt scalarltsel scalarltjoinsel )); -DATA(insert OID = 1658 ( ">" PGUID 0 b t f 23 26 16 1662 1659 0 0 oidgt scalargtsel scalargtjoinsel )); -DATA(insert OID = 1659 ( "<=" PGUID 0 b t f 23 26 16 1665 1658 0 0 oidle scalarltsel scalarltjoinsel )); -DATA(insert OID = 1660 ( ">=" PGUID 0 b t f 23 26 16 1664 1657 0 0 oidge scalargtsel scalargtjoinsel )); -DATA(insert OID = 1661 ( "<>" PGUID 0 b t f 26 23 16 1656 1137 0 0 oidne neqsel neqjoinsel )); -DATA(insert OID = 1662 ( "<" PGUID 0 b t f 26 23 16 1658 1665 0 0 oidlt scalarltsel scalarltjoinsel )); -DATA(insert OID = 1663 ( ">" PGUID 0 b t f 26 23 16 1657 1664 0 0 oidgt scalargtsel scalargtjoinsel )); -DATA(insert OID = 1664 ( "<=" PGUID 0 b t f 26 23 16 1660 1663 0 0 oidle scalarltsel scalarltjoinsel )); -DATA(insert OID = 1665 ( ">=" PGUID 0 b t f 26 23 16 1659 1662 0 0 oidge scalargtsel scalargtjoinsel )); +DATA(insert OID = 1656 ( "<>" PGNSP PGUID 0 b t f 23 26 16 1661 1136 0 0 0 0 oidne neqsel neqjoinsel )); +DATA(insert OID = 1657 ( "<" PGNSP PGUID 0 b t f 23 26 16 1663 1660 0 0 0 0 oidlt scalarltsel scalarltjoinsel )); +DATA(insert OID = 1658 ( ">" PGNSP PGUID 0 b t f 23 26 16 1662 1659 0 0 0 0 oidgt scalargtsel scalargtjoinsel )); +DATA(insert OID = 1659 ( "<=" PGNSP PGUID 0 b t f 23 26 16 1665 1658 0 0 0 0 oidle scalarltsel scalarltjoinsel )); +DATA(insert OID = 1660 ( ">=" PGNSP PGUID 0 b t f 23 26 16 1664 1657 0 0 0 0 oidge scalargtsel scalargtjoinsel )); +DATA(insert OID = 1661 ( "<>" PGNSP PGUID 0 b t f 26 23 16 1656 1137 0 0 0 0 oidne neqsel neqjoinsel )); +DATA(insert OID = 1662 ( "<" PGNSP PGUID 0 b t f 26 23 16 1658 1665 0 0 0 0 oidlt scalarltsel scalarltjoinsel )); +DATA(insert OID = 1663 ( ">" PGNSP PGUID 0 b t f 26 23 16 1657 1664 0 0 0 0 oidgt scalargtsel scalargtjoinsel )); +DATA(insert OID = 1664 ( "<=" PGNSP PGUID 0 b t f 26 23 16 1660 1663 0 0 0 0 oidle scalarltsel scalarltjoinsel )); +DATA(insert OID = 1665 ( ">=" PGNSP PGUID 0 b t f 26 23 16 1659 1662 0 0 0 0 oidge scalargtsel scalargtjoinsel )); /* NUMERIC type - OID's 1700-1799 */ -DATA(insert OID = 1751 ( "-" PGUID 0 l t f 0 1700 1700 0 0 0 0 numeric_uminus - - )); -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 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 - - )); -DATA(insert OID = 1761 ( "/" PGUID 0 b t f 1700 1700 1700 0 0 0 0 numeric_div - - )); -DATA(insert OID = 1762 ( "%" PGUID 0 b t f 1700 1700 1700 0 0 0 0 numeric_mod - - )); -DATA(insert OID = 1763 ( "@" PGUID 0 l t f 0 1700 1700 0 0 0 0 numeric_abs - - )); +DATA(insert OID = 1751 ( "-" PGNSP PGUID 0 l t f 0 1700 1700 0 0 0 0 0 0 numeric_uminus - - )); +DATA(insert OID = 1752 ( "=" PGNSP PGUID 0 b t f 1700 1700 16 1752 1753 1754 1754 1754 1756 numeric_eq eqsel eqjoinsel )); +DATA(insert OID = 1753 ( "<>" PGNSP PGUID 0 b t f 1700 1700 16 1753 1752 0 0 0 0 numeric_ne neqsel neqjoinsel )); +DATA(insert OID = 1754 ( "<" PGNSP PGUID 0 b t f 1700 1700 16 1756 1757 0 0 0 0 numeric_lt scalarltsel scalarltjoinsel )); +DATA(insert OID = 1755 ( "<=" PGNSP PGUID 0 b t f 1700 1700 16 1757 1756 0 0 0 0 numeric_le scalarltsel scalarltjoinsel )); +DATA(insert OID = 1756 ( ">" PGNSP PGUID 0 b t f 1700 1700 16 1754 1755 0 0 0 0 numeric_gt scalargtsel scalargtjoinsel )); +DATA(insert OID = 1757 ( ">=" PGNSP PGUID 0 b t f 1700 1700 16 1755 1754 0 0 0 0 numeric_ge scalargtsel scalargtjoinsel )); +DATA(insert OID = 1758 ( "+" PGNSP PGUID 0 b t f 1700 1700 1700 1758 0 0 0 0 0 numeric_add - - )); +DATA(insert OID = 1759 ( "-" PGNSP PGUID 0 b t f 1700 1700 1700 0 0 0 0 0 0 numeric_sub - - )); +DATA(insert OID = 1760 ( "*" PGNSP PGUID 0 b t f 1700 1700 1700 1760 0 0 0 0 0 numeric_mul - - )); +DATA(insert OID = 1761 ( "/" PGNSP PGUID 0 b t f 1700 1700 1700 0 0 0 0 0 0 numeric_div - - )); +DATA(insert OID = 1762 ( "%" PGNSP PGUID 0 b t f 1700 1700 1700 0 0 0 0 0 0 numeric_mod - - )); +DATA(insert OID = 1763 ( "@" PGNSP PGUID 0 l t f 0 1700 1700 0 0 0 0 0 0 numeric_abs - - )); -DATA(insert OID = 1784 ( "=" PGUID 0 b t f 1560 1560 16 1784 1785 1786 1786 biteq eqsel eqjoinsel )); -DATA(insert OID = 1785 ( "<>" PGUID 0 b t f 1560 1560 16 1785 1784 0 0 bitne neqsel neqjoinsel )); -DATA(insert OID = 1786 ( "<" PGUID 0 b t f 1560 1560 16 1787 1789 0 0 bitlt scalarltsel scalarltjoinsel )); -DATA(insert OID = 1787 ( ">" PGUID 0 b t f 1560 1560 16 1786 1788 0 0 bitgt scalargtsel scalargtjoinsel )); -DATA(insert OID = 1788 ( "<=" PGUID 0 b t f 1560 1560 16 1789 1787 0 0 bitle scalarltsel scalarltjoinsel )); -DATA(insert OID = 1789 ( ">=" PGUID 0 b t f 1560 1560 16 1788 1786 0 0 bitge scalargtsel scalargtjoinsel )); -DATA(insert OID = 1791 ( "&" PGUID 0 b t f 1560 1560 1560 1791 0 0 0 bitand - - )); -DATA(insert OID = 1792 ( "|" PGUID 0 b t f 1560 1560 1560 1792 0 0 0 bitor - - )); -DATA(insert OID = 1793 ( "#" PGUID 0 b t f 1560 1560 1560 1793 0 0 0 bitxor - - )); -DATA(insert OID = 1794 ( "~" PGUID 0 l t f 0 1560 1560 0 0 0 0 bitnot - - )); -DATA(insert OID = 1795 ( "<<" PGUID 0 b t f 1560 23 1560 0 0 0 0 bitshiftleft - - )); -DATA(insert OID = 1796 ( ">>" PGUID 0 b t f 1560 23 1560 0 0 0 0 bitshiftright - - )); -DATA(insert OID = 1797 ( "||" PGUID 0 b t f 1560 1560 1560 0 0 0 0 bitcat - - )); +DATA(insert OID = 1784 ( "=" PGNSP PGUID 0 b t f 1560 1560 16 1784 1785 1786 1786 1786 1787 biteq eqsel eqjoinsel )); +DATA(insert OID = 1785 ( "<>" PGNSP PGUID 0 b t f 1560 1560 16 1785 1784 0 0 0 0 bitne neqsel neqjoinsel )); +DATA(insert OID = 1786 ( "<" PGNSP PGUID 0 b t f 1560 1560 16 1787 1789 0 0 0 0 bitlt scalarltsel scalarltjoinsel )); +DATA(insert OID = 1787 ( ">" PGNSP PGUID 0 b t f 1560 1560 16 1786 1788 0 0 0 0 bitgt scalargtsel scalargtjoinsel )); +DATA(insert OID = 1788 ( "<=" PGNSP PGUID 0 b t f 1560 1560 16 1789 1787 0 0 0 0 bitle scalarltsel scalarltjoinsel )); +DATA(insert OID = 1789 ( ">=" PGNSP PGUID 0 b t f 1560 1560 16 1788 1786 0 0 0 0 bitge scalargtsel scalargtjoinsel )); +DATA(insert OID = 1791 ( "&" PGNSP PGUID 0 b t f 1560 1560 1560 1791 0 0 0 0 0 bitand - - )); +DATA(insert OID = 1792 ( "|" PGNSP PGUID 0 b t f 1560 1560 1560 1792 0 0 0 0 0 bitor - - )); +DATA(insert OID = 1793 ( "#" PGNSP PGUID 0 b t f 1560 1560 1560 1793 0 0 0 0 0 bitxor - - )); +DATA(insert OID = 1794 ( "~" PGNSP PGUID 0 l t f 0 1560 1560 0 0 0 0 0 0 bitnot - - )); +DATA(insert OID = 1795 ( "<<" PGNSP PGUID 0 b t f 1560 23 1560 0 0 0 0 0 0 bitshiftleft - - )); +DATA(insert OID = 1796 ( ">>" PGNSP PGUID 0 b t f 1560 23 1560 0 0 0 0 0 0 bitshiftright - - )); +DATA(insert OID = 1797 ( "||" PGNSP PGUID 0 b t f 1560 1560 1560 0 0 0 0 0 0 bitcat - - )); -DATA(insert OID = 1800 ( "+" PGUID 0 b t f 1083 1186 1083 0 0 0 0 time_pl_interval - - )); -DATA(insert OID = 1801 ( "-" PGUID 0 b t f 1083 1186 1083 0 0 0 0 time_mi_interval - - )); -DATA(insert OID = 1802 ( "+" PGUID 0 b t f 1266 1186 1266 0 0 0 0 timetz_pl_interval - - )); -DATA(insert OID = 1803 ( "-" PGUID 0 b t f 1266 1186 1266 0 0 0 0 timetz_mi_interval - - )); +DATA(insert OID = 1800 ( "+" PGNSP PGUID 0 b t f 1083 1186 1083 0 0 0 0 0 0 time_pl_interval - - )); +DATA(insert OID = 1801 ( "-" PGNSP PGUID 0 b t f 1083 1186 1083 0 0 0 0 0 0 time_mi_interval - - )); +DATA(insert OID = 1802 ( "+" PGNSP PGUID 0 b t f 1266 1186 1266 0 0 0 0 0 0 timetz_pl_interval - - )); +DATA(insert OID = 1803 ( "-" PGNSP PGUID 0 b t f 1266 1186 1266 0 0 0 0 0 0 timetz_mi_interval - - )); -DATA(insert OID = 1804 ( "=" PGUID 0 b t f 1562 1562 16 1804 1805 1806 1806 varbiteq eqsel eqjoinsel )); -DATA(insert OID = 1805 ( "<>" PGUID 0 b t f 1562 1562 16 1805 1804 0 0 varbitne neqsel neqjoinsel )); -DATA(insert OID = 1806 ( "<" PGUID 0 b t f 1562 1562 16 1807 1809 0 0 varbitlt scalarltsel scalarltjoinsel )); -DATA(insert OID = 1807 ( ">" PGUID 0 b t f 1562 1562 16 1806 1808 0 0 varbitgt scalargtsel scalargtjoinsel )); -DATA(insert OID = 1808 ( "<=" PGUID 0 b t f 1562 1562 16 1809 1807 0 0 varbitle scalarltsel scalarltjoinsel )); -DATA(insert OID = 1809 ( ">=" PGUID 0 b t f 1562 1562 16 1808 1806 0 0 varbitge scalargtsel scalargtjoinsel )); +DATA(insert OID = 1804 ( "=" PGNSP PGUID 0 b t f 1562 1562 16 1804 1805 1806 1806 1806 1807 varbiteq eqsel eqjoinsel )); +DATA(insert OID = 1805 ( "<>" PGNSP PGUID 0 b t f 1562 1562 16 1805 1804 0 0 0 0 varbitne neqsel neqjoinsel )); +DATA(insert OID = 1806 ( "<" PGNSP PGUID 0 b t f 1562 1562 16 1807 1809 0 0 0 0 varbitlt scalarltsel scalarltjoinsel )); +DATA(insert OID = 1807 ( ">" PGNSP PGUID 0 b t f 1562 1562 16 1806 1808 0 0 0 0 varbitgt scalargtsel scalargtjoinsel )); +DATA(insert OID = 1808 ( "<=" PGNSP PGUID 0 b t f 1562 1562 16 1809 1807 0 0 0 0 varbitle scalarltsel scalarltjoinsel )); +DATA(insert OID = 1809 ( ">=" PGNSP PGUID 0 b t f 1562 1562 16 1808 1806 0 0 0 0 varbitge scalargtsel scalargtjoinsel )); -DATA(insert OID = 1849 ( "+" PGUID 0 b t f 1186 1083 1083 0 0 0 0 interval_pl_time - - )); +DATA(insert OID = 1849 ( "+" PGNSP PGUID 0 b t f 1186 1083 1083 0 0 0 0 0 0 interval_pl_time - - )); -DATA(insert OID = 1862 ( "=" PGUID 0 b t f 21 20 16 1868 1863 95 412 int28eq eqsel eqjoinsel )); -DATA(insert OID = 1863 ( "<>" PGUID 0 b t f 21 20 16 1869 1862 0 0 int28ne neqsel neqjoinsel )); -DATA(insert OID = 1864 ( "<" PGUID 0 b t f 21 20 16 1871 1867 0 0 int28lt scalarltsel scalarltjoinsel )); -DATA(insert OID = 1865 ( ">" PGUID 0 b t f 21 20 16 1870 1866 0 0 int28gt scalargtsel scalargtjoinsel )); -DATA(insert OID = 1866 ( "<=" PGUID 0 b t f 21 20 16 1873 1865 0 0 int28le scalarltsel scalarltjoinsel )); -DATA(insert OID = 1867 ( ">=" PGUID 0 b t f 21 20 16 1872 1864 0 0 int28ge scalargtsel scalargtjoinsel )); +DATA(insert OID = 1862 ( "=" PGNSP PGUID 0 b t f 21 20 16 1868 1863 95 412 1864 1865 int28eq eqsel eqjoinsel )); +DATA(insert OID = 1863 ( "<>" PGNSP PGUID 0 b t f 21 20 16 1869 1862 0 0 0 0 int28ne neqsel neqjoinsel )); +DATA(insert OID = 1864 ( "<" PGNSP PGUID 0 b t f 21 20 16 1871 1867 0 0 0 0 int28lt scalarltsel scalarltjoinsel )); +DATA(insert OID = 1865 ( ">" PGNSP PGUID 0 b t f 21 20 16 1870 1866 0 0 0 0 int28gt scalargtsel scalargtjoinsel )); +DATA(insert OID = 1866 ( "<=" PGNSP PGUID 0 b t f 21 20 16 1873 1865 0 0 0 0 int28le scalarltsel scalarltjoinsel )); +DATA(insert OID = 1867 ( ">=" PGNSP PGUID 0 b t f 21 20 16 1872 1864 0 0 0 0 int28ge scalargtsel scalargtjoinsel )); -DATA(insert OID = 1868 ( "=" PGUID 0 b t f 20 21 16 1862 1869 412 95 int82eq eqsel eqjoinsel )); -DATA(insert OID = 1869 ( "<>" PGUID 0 b t f 20 21 16 1863 1868 0 0 int82ne neqsel neqjoinsel )); -DATA(insert OID = 1870 ( "<" PGUID 0 b t f 20 21 16 1865 1873 0 0 int82lt scalarltsel scalarltjoinsel )); -DATA(insert OID = 1871 ( ">" PGUID 0 b t f 20 21 16 1864 1872 0 0 int82gt scalargtsel scalargtjoinsel )); -DATA(insert OID = 1872 ( "<=" PGUID 0 b t f 20 21 16 1867 1871 0 0 int82le scalarltsel scalarltjoinsel )); -DATA(insert OID = 1873 ( ">=" PGUID 0 b t f 20 21 16 1866 1870 0 0 int82ge scalargtsel scalargtjoinsel )); +DATA(insert OID = 1868 ( "=" PGNSP PGUID 0 b t f 20 21 16 1862 1869 412 95 1870 1871 int82eq eqsel eqjoinsel )); +DATA(insert OID = 1869 ( "<>" PGNSP PGUID 0 b t f 20 21 16 1863 1868 0 0 0 0 int82ne neqsel neqjoinsel )); +DATA(insert OID = 1870 ( "<" PGNSP PGUID 0 b t f 20 21 16 1865 1873 0 0 0 0 int82lt scalarltsel scalarltjoinsel )); +DATA(insert OID = 1871 ( ">" PGNSP PGUID 0 b t f 20 21 16 1864 1872 0 0 0 0 int82gt scalargtsel scalargtjoinsel )); +DATA(insert OID = 1872 ( "<=" PGNSP PGUID 0 b t f 20 21 16 1867 1871 0 0 0 0 int82le scalarltsel scalarltjoinsel )); +DATA(insert OID = 1873 ( ">=" PGNSP PGUID 0 b t f 20 21 16 1866 1870 0 0 0 0 int82ge scalargtsel scalargtjoinsel )); -DATA(insert OID = 1874 ( "&" PGUID 0 b t f 21 21 21 1874 0 0 0 int2and - - )); -DATA(insert OID = 1875 ( "|" PGUID 0 b t f 21 21 21 1875 0 0 0 int2or - - )); -DATA(insert OID = 1876 ( "#" PGUID 0 b t f 21 21 21 1876 0 0 0 int2xor - - )); -DATA(insert OID = 1877 ( "~" PGUID 0 l t f 0 21 21 0 0 0 0 int2not - - )); -DATA(insert OID = 1878 ( "<<" PGUID 0 b t f 21 23 21 0 0 0 0 int2shl - - )); -DATA(insert OID = 1879 ( ">>" PGUID 0 b t f 21 23 21 0 0 0 0 int2shr - - )); +DATA(insert OID = 1874 ( "&" PGNSP PGUID 0 b t f 21 21 21 1874 0 0 0 0 0 int2and - - )); +DATA(insert OID = 1875 ( "|" PGNSP PGUID 0 b t f 21 21 21 1875 0 0 0 0 0 int2or - - )); +DATA(insert OID = 1876 ( "#" PGNSP PGUID 0 b t f 21 21 21 1876 0 0 0 0 0 int2xor - - )); +DATA(insert OID = 1877 ( "~" PGNSP PGUID 0 l t f 0 21 21 0 0 0 0 0 0 int2not - - )); +DATA(insert OID = 1878 ( "<<" PGNSP PGUID 0 b t f 21 23 21 0 0 0 0 0 0 int2shl - - )); +DATA(insert OID = 1879 ( ">>" PGNSP PGUID 0 b t f 21 23 21 0 0 0 0 0 0 int2shr - - )); -DATA(insert OID = 1880 ( "&" PGUID 0 b t f 23 23 23 1880 0 0 0 int4and - - )); -DATA(insert OID = 1881 ( "|" PGUID 0 b t f 23 23 23 1881 0 0 0 int4or - - )); -DATA(insert OID = 1882 ( "#" PGUID 0 b t f 23 23 23 1882 0 0 0 int4xor - - )); -DATA(insert OID = 1883 ( "~" PGUID 0 l t f 0 23 23 0 0 0 0 int4not - - )); -DATA(insert OID = 1884 ( "<<" PGUID 0 b t f 23 23 23 0 0 0 0 int4shl - - )); -DATA(insert OID = 1885 ( ">>" PGUID 0 b t f 23 23 23 0 0 0 0 int4shr - - )); +DATA(insert OID = 1880 ( "&" PGNSP PGUID 0 b t f 23 23 23 1880 0 0 0 0 0 int4and - - )); +DATA(insert OID = 1881 ( "|" PGNSP PGUID 0 b t f 23 23 23 1881 0 0 0 0 0 int4or - - )); +DATA(insert OID = 1882 ( "#" PGNSP PGUID 0 b t f 23 23 23 1882 0 0 0 0 0 int4xor - - )); +DATA(insert OID = 1883 ( "~" PGNSP PGUID 0 l t f 0 23 23 0 0 0 0 0 0 int4not - - )); +DATA(insert OID = 1884 ( "<<" PGNSP PGUID 0 b t f 23 23 23 0 0 0 0 0 0 int4shl - - )); +DATA(insert OID = 1885 ( ">>" PGNSP PGUID 0 b t f 23 23 23 0 0 0 0 0 0 int4shr - - )); -DATA(insert OID = 1886 ( "&" PGUID 0 b t f 20 20 20 1886 0 0 0 int8and - - )); -DATA(insert OID = 1887 ( "|" PGUID 0 b t f 20 20 20 1887 0 0 0 int8or - - )); -DATA(insert OID = 1888 ( "#" PGUID 0 b t f 20 20 20 1888 0 0 0 int8xor - - )); -DATA(insert OID = 1889 ( "~" PGUID 0 l t f 0 20 20 0 0 0 0 int8not - - )); -DATA(insert OID = 1890 ( "<<" PGUID 0 b t f 20 23 20 0 0 0 0 int8shl - - )); -DATA(insert OID = 1891 ( ">>" PGUID 0 b t f 20 23 20 0 0 0 0 int8shr - - )); +DATA(insert OID = 1886 ( "&" PGNSP PGUID 0 b t f 20 20 20 1886 0 0 0 0 0 int8and - - )); +DATA(insert OID = 1887 ( "|" PGNSP PGUID 0 b t f 20 20 20 1887 0 0 0 0 0 int8or - - )); +DATA(insert OID = 1888 ( "#" PGNSP PGUID 0 b t f 20 20 20 1888 0 0 0 0 0 int8xor - - )); +DATA(insert OID = 1889 ( "~" PGNSP PGUID 0 l t f 0 20 20 0 0 0 0 0 0 int8not - - )); +DATA(insert OID = 1890 ( "<<" PGNSP PGUID 0 b t f 20 23 20 0 0 0 0 0 0 int8shl - - )); +DATA(insert OID = 1891 ( ">>" PGNSP PGUID 0 b t f 20 23 20 0 0 0 0 0 0 int8shr - - )); -DATA(insert OID = 1916 ( "+" PGUID 0 l t f 0 20 20 0 0 0 0 int8up - - )); -DATA(insert OID = 1917 ( "+" PGUID 0 l t f 0 21 21 0 0 0 0 int2up - - )); -DATA(insert OID = 1918 ( "+" PGUID 0 l t f 0 23 23 0 0 0 0 int4up - - )); -DATA(insert OID = 1919 ( "+" PGUID 0 l t f 0 700 700 0 0 0 0 float4up - - )); -DATA(insert OID = 1920 ( "+" PGUID 0 l t f 0 701 701 0 0 0 0 float8up - - )); -DATA(insert OID = 1921 ( "+" PGUID 0 l t f 0 1700 1700 0 0 0 0 numeric_uplus - - )); +DATA(insert OID = 1916 ( "+" PGNSP PGUID 0 l t f 0 20 20 0 0 0 0 0 0 int8up - - )); +DATA(insert OID = 1917 ( "+" PGNSP PGUID 0 l t f 0 21 21 0 0 0 0 0 0 int2up - - )); +DATA(insert OID = 1918 ( "+" PGNSP PGUID 0 l t f 0 23 23 0 0 0 0 0 0 int4up - - )); +DATA(insert OID = 1919 ( "+" PGNSP PGUID 0 l t f 0 700 700 0 0 0 0 0 0 float4up - - )); +DATA(insert OID = 1920 ( "+" PGNSP PGUID 0 l t f 0 701 701 0 0 0 0 0 0 float8up - - )); +DATA(insert OID = 1921 ( "+" PGNSP PGUID 0 l t f 0 1700 1700 0 0 0 0 0 0 numeric_uplus - - )); /* bytea operators */ -DATA(insert OID = 1955 ( "=" PGUID 0 b t t 17 17 16 1955 1956 1957 1957 byteaeq eqsel eqjoinsel )); -DATA(insert OID = 1956 ( "<>" PGUID 0 b t f 17 17 16 1956 1955 0 0 byteane neqsel neqjoinsel )); -DATA(insert OID = 1957 ( "<" PGUID 0 b t f 17 17 16 1959 1960 0 0 bytealt scalarltsel scalarltjoinsel )); -DATA(insert OID = 1958 ( "<=" PGUID 0 b t f 17 17 16 1960 1959 0 0 byteale scalarltsel scalarltjoinsel )); -DATA(insert OID = 1959 ( ">" PGUID 0 b t f 17 17 16 1957 1958 0 0 byteagt scalargtsel scalargtjoinsel )); -DATA(insert OID = 1960 ( ">=" PGUID 0 b t f 17 17 16 1958 1957 0 0 byteage scalargtsel scalargtjoinsel )); -DATA(insert OID = 2016 ( "~~" PGUID 0 b t f 17 17 16 0 2017 0 0 bytealike likesel likejoinsel )); +DATA(insert OID = 1955 ( "=" PGNSP PGUID 0 b t t 17 17 16 1955 1956 1957 1957 1957 1959 byteaeq eqsel eqjoinsel )); +DATA(insert OID = 1956 ( "<>" PGNSP PGUID 0 b t f 17 17 16 1956 1955 0 0 0 0 byteane neqsel neqjoinsel )); +DATA(insert OID = 1957 ( "<" PGNSP PGUID 0 b t f 17 17 16 1959 1960 0 0 0 0 bytealt scalarltsel scalarltjoinsel )); +DATA(insert OID = 1958 ( "<=" PGNSP PGUID 0 b t f 17 17 16 1960 1959 0 0 0 0 byteale scalarltsel scalarltjoinsel )); +DATA(insert OID = 1959 ( ">" PGNSP PGUID 0 b t f 17 17 16 1957 1958 0 0 0 0 byteagt scalargtsel scalargtjoinsel )); +DATA(insert OID = 1960 ( ">=" PGNSP PGUID 0 b t f 17 17 16 1958 1957 0 0 0 0 byteage scalargtsel scalargtjoinsel )); +DATA(insert OID = 2016 ( "~~" PGNSP PGUID 0 b t f 17 17 16 0 2017 0 0 0 0 bytealike likesel likejoinsel )); #define OID_BYTEA_LIKE_OP 2016 -DATA(insert OID = 2017 ( "!~~" PGUID 0 b t f 17 17 16 0 2016 0 0 byteanlike nlikesel nlikejoinsel )); -DATA(insert OID = 2018 ( "||" PGUID 0 b t f 17 17 17 0 0 0 0 byteacat - - )); +DATA(insert OID = 2017 ( "!~~" PGNSP PGUID 0 b t f 17 17 16 0 2016 0 0 0 0 byteanlike nlikesel nlikejoinsel )); +DATA(insert OID = 2018 ( "||" PGNSP PGUID 0 b t f 17 17 17 0 0 0 0 0 0 byteacat - - )); /* timestamp operators */ -/* name, owner, prec, kind, isleft, canhash, left, right, result, com, negate, lsortop, rsortop, oprcode, operrest, oprjoin */ -DATA(insert OID = 2060 ( "=" PGUID 0 b t f 1114 1114 16 2060 2061 2062 2062 timestamp_eq eqsel eqjoinsel )); -DATA(insert OID = 2061 ( "<>" PGUID 0 b t f 1114 1114 16 2061 2060 0 0 timestamp_ne neqsel neqjoinsel )); -DATA(insert OID = 2062 ( "<" PGUID 0 b t f 1114 1114 16 2064 2065 0 0 timestamp_lt scalarltsel scalarltjoinsel )); -DATA(insert OID = 2063 ( "<=" PGUID 0 b t f 1114 1114 16 2065 2064 0 0 timestamp_le scalarltsel scalarltjoinsel )); -DATA(insert OID = 2064 ( ">" PGUID 0 b t f 1114 1114 16 2062 2063 0 0 timestamp_gt scalargtsel scalargtjoinsel )); -DATA(insert OID = 2065 ( ">=" PGUID 0 b t f 1114 1114 16 2063 2062 0 0 timestamp_ge scalargtsel scalargtjoinsel )); -DATA(insert OID = 2066 ( "+" PGUID 0 b t f 1114 1186 1114 0 0 0 0 timestamp_pl_span - - )); -DATA(insert OID = 2067 ( "-" PGUID 0 b t f 1114 1114 1186 0 0 0 0 timestamp_mi - - )); -DATA(insert OID = 2068 ( "-" PGUID 0 b t f 1114 1186 1114 0 0 0 0 timestamp_mi_span - - )); +DATA(insert OID = 2060 ( "=" PGNSP PGUID 0 b t f 1114 1114 16 2060 2061 2062 2062 2062 2064 timestamp_eq eqsel eqjoinsel )); +DATA(insert OID = 2061 ( "<>" PGNSP PGUID 0 b t f 1114 1114 16 2061 2060 0 0 0 0 timestamp_ne neqsel neqjoinsel )); +DATA(insert OID = 2062 ( "<" PGNSP PGUID 0 b t f 1114 1114 16 2064 2065 0 0 0 0 timestamp_lt scalarltsel scalarltjoinsel )); +DATA(insert OID = 2063 ( "<=" PGNSP PGUID 0 b t f 1114 1114 16 2065 2064 0 0 0 0 timestamp_le scalarltsel scalarltjoinsel )); +DATA(insert OID = 2064 ( ">" PGNSP PGUID 0 b t f 1114 1114 16 2062 2063 0 0 0 0 timestamp_gt scalargtsel scalargtjoinsel )); +DATA(insert OID = 2065 ( ">=" PGNSP PGUID 0 b t f 1114 1114 16 2063 2062 0 0 0 0 timestamp_ge scalargtsel scalargtjoinsel )); +DATA(insert OID = 2066 ( "+" PGNSP PGUID 0 b t f 1114 1186 1114 0 0 0 0 0 0 timestamp_pl_span - - )); +DATA(insert OID = 2067 ( "-" PGNSP PGUID 0 b t f 1114 1114 1186 0 0 0 0 0 0 timestamp_mi - - )); +DATA(insert OID = 2068 ( "-" PGNSP PGUID 0 b t f 1114 1186 1114 0 0 0 0 0 0 timestamp_mi_span - - )); /* * function prototypes */ extern void OperatorCreate(const char *operatorName, + Oid operatorNamespace, Oid leftTypeId, Oid rightTypeId, - const char *procedureName, + List *procedureName, uint16 precedence, bool isLeftAssociative, - const char *commutatorName, - const char *negatorName, - const char *restrictionName, - const char *joinName, + List *commutatorName, + List *negatorName, + List *restrictionName, + List *joinName, bool canHash, - const char *leftSortName, - const char *rightSortName); + List *leftSortName, + List *rightSortName, + List *ltCompareName, + List *gtCompareName); #endif /* PG_OPERATOR_H */ diff --git a/src/include/commands/defrem.h b/src/include/commands/defrem.h index 711bc91f579..4e257fbd91a 100644 --- a/src/include/commands/defrem.h +++ b/src/include/commands/defrem.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: defrem.h,v 1.35 2002/04/15 05:22:03 tgl Exp $ + * $Id: defrem.h,v 1.36 2002/04/16 23:08:12 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -42,7 +42,7 @@ extern void CreateFunction(ProcedureStmt *stmt); extern void RemoveFunction(List *functionName, List *argTypes); extern void DefineOperator(List *names, List *parameters); -extern void RemoveOperator(char *operatorName, +extern void RemoveOperator(List *operatorName, TypeName *typeName1, TypeName *typeName2); extern void DefineAggregate(List *names, List *parameters); diff --git a/src/include/nodes/makefuncs.h b/src/include/nodes/makefuncs.h index 905f803891a..4096c2d9fb3 100644 --- a/src/include/nodes/makefuncs.h +++ b/src/include/nodes/makefuncs.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: makefuncs.h,v 1.34 2002/03/29 19:06:23 tgl Exp $ + * $Id: makefuncs.h,v 1.35 2002/04/16 23:08:12 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -16,6 +16,11 @@ #include "nodes/parsenodes.h" +extern A_Expr *makeA_Expr(int oper, List *name, Node *lexpr, Node *rexpr); + +extern A_Expr *makeSimpleA_Expr(int oper, const char *name, + Node *lexpr, Node *rexpr); + extern Oper *makeOper(Oid opno, Oid opid, Oid opresulttype); diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index 6fc2fec9ad9..7fe606825e4 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: parsenodes.h,v 1.169 2002/04/09 20:35:54 tgl Exp $ + * $Id: parsenodes.h,v 1.170 2002/04/16 23:08:12 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -158,7 +158,7 @@ typedef struct A_Expr { NodeTag type; int oper; /* type of operation (OP,OR,AND,NOT) */ - char *opname; /* name of operator */ + List *name; /* possibly-qualified name of operator */ Node *lexpr; /* left argument */ Node *rexpr; /* right argument */ } A_Expr; @@ -373,7 +373,7 @@ typedef struct InsertDefault typedef struct SortGroupBy { NodeTag type; - char *useOp; /* operator to use */ + List *useOp; /* operator to use */ Node *node; /* Expression */ } SortGroupBy; @@ -1189,7 +1189,7 @@ typedef struct RemoveFuncStmt typedef struct RemoveOperStmt { NodeTag type; - char *opname; /* operator to drop */ + List *opname; /* operator to drop */ List *args; /* types of the arguments */ } RemoveOperStmt; diff --git a/src/include/parser/parse_func.h b/src/include/parser/parse_func.h index e6353be34e7..17c618f0acf 100644 --- a/src/include/parser/parse_func.h +++ b/src/include/parser/parse_func.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: parse_func.h,v 1.39 2002/04/11 20:00:15 tgl Exp $ + * $Id: parse_func.h,v 1.40 2002/04/16 23:08:12 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -28,16 +28,6 @@ typedef struct _InhPaths Oid *supervec; /* vector of superclasses */ } InhPaths; -/* - * This structure holds a list of possible functions or operators that - * agree with the known name and argument types of the function/operator. - */ -typedef struct _CandidateList -{ - Oid *args; - struct _CandidateList *next; -} *CandidateList; - /* Result codes for func_get_detail */ typedef enum { diff --git a/src/include/parser/parse_node.h b/src/include/parser/parse_node.h index ecf67f8275b..8551000aca4 100644 --- a/src/include/parser/parse_node.h +++ b/src/include/parser/parse_node.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: parse_node.h,v 1.29 2001/11/05 17:46:35 momjian Exp $ + * $Id: parse_node.h,v 1.30 2002/04/16 23:08:12 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -51,9 +51,8 @@ typedef struct ParseState } ParseState; extern ParseState *make_parsestate(ParseState *parentParseState); -extern Expr *make_op(char *opname, Node *ltree, Node *rtree); -extern Node *make_operand(char *opname, Node *tree, - Oid orig_typeId, Oid target_typeId); +extern Expr *make_op(List *opname, Node *ltree, Node *rtree); +extern Node *make_operand(Node *tree, Oid orig_typeId, Oid target_typeId); extern Var *make_var(ParseState *pstate, RangeTblEntry *rte, int attrno); extern ArrayRef *transformArraySubscripts(ParseState *pstate, Node *arrayBase, diff --git a/src/include/parser/parse_oper.h b/src/include/parser/parse_oper.h index c8f9abd1886..5793c16b311 100644 --- a/src/include/parser/parse_oper.h +++ b/src/include/parser/parse_oper.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: parse_oper.h,v 1.18 2001/11/05 17:46:35 momjian Exp $ + * $Id: parse_oper.h,v 1.19 2002/04/16 23:08:12 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -15,25 +15,31 @@ #define PARSE_OPER_H #include "access/htup.h" +#include "nodes/parsenodes.h" typedef HeapTuple Operator; +/* Routines to look up an operator given name and exact input type(s) */ +extern Oid LookupOperName(List *opername, Oid oprleft, Oid oprright); +extern Oid LookupOperNameTypeNames(List *opername, TypeName *oprleft, + TypeName *oprright, const char *caller); + /* Routines to find operators matching a name and given input types */ /* NB: the selected operator may require coercion of the input types! */ -extern Operator oper(char *op, Oid arg1, Oid arg2, bool noError); -extern Operator right_oper(char *op, Oid arg); -extern Operator left_oper(char *op, Oid arg); +extern Operator oper(List *op, Oid arg1, Oid arg2, bool noError); +extern Operator right_oper(List *op, Oid arg); +extern Operator left_oper(List *op, Oid arg); /* Routines to find operators that DO NOT require coercion --- ie, their */ /* input types are either exactly as given, or binary-compatible */ -extern Operator compatible_oper(char *op, Oid arg1, Oid arg2, bool noError); +extern Operator compatible_oper(List *op, Oid arg1, Oid arg2, bool noError); /* currently no need for compatible_left_oper/compatible_right_oper */ /* Convenience routines that call compatible_oper() and return either */ /* the operator OID or the underlying function OID, or InvalidOid if fail */ -extern Oid compatible_oper_opid(char *op, Oid arg1, Oid arg2, bool noError); -extern Oid compatible_oper_funcid(char *op, Oid arg1, Oid arg2, bool noError); +extern Oid compatible_oper_opid(List *op, Oid arg1, Oid arg2, bool noError); +extern Oid compatible_oper_funcid(List *op, Oid arg1, Oid arg2, bool noError); /* Convenience routine that packages a specific call on compatible_oper */ extern Oid any_ordering_op(Oid argtype); diff --git a/src/include/utils/syscache.h b/src/include/utils/syscache.h index 7d31a57be61..e567a8b22b6 100644 --- a/src/include/utils/syscache.h +++ b/src/include/utils/syscache.h @@ -9,7 +9,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: syscache.h,v 1.44 2002/04/11 20:00:17 tgl Exp $ + * $Id: syscache.h,v 1.45 2002/04/16 23:08:12 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -46,7 +46,7 @@ #define LANGOID 15 #define NAMESPACENAME 16 #define NAMESPACEOID 17 -#define OPERNAME 18 +#define OPERNAMENSP 18 #define OPEROID 19 #define PROCNAMENSP 20 #define PROCOID 21 diff --git a/src/test/regress/expected/errors.out b/src/test/regress/expected/errors.out index cdd4218d99e..27a7b38dd48 100644 --- a/src/test/regress/expected/errors.out +++ b/src/test/regress/expected/errors.out @@ -173,13 +173,13 @@ drop operator; ERROR: parser: parse error at or near ";" -- bad operator name drop operator equals; -ERROR: parser: parse error at or near "equals" +ERROR: parser: parse error at or near ";" -- missing type list drop operator ===; ERROR: parser: parse error at or near ";" -- missing parentheses drop operator int4, int4; -ERROR: parser: parse error at or near "int4" +ERROR: parser: parse error at or near "," -- missing operator name drop operator (int4, int4); ERROR: parser: parse error at or near "(" @@ -191,7 +191,7 @@ drop operator === (int4); ERROR: parser: argument type missing (use NONE for unary operators) -- no such operator by that name drop operator === (int4, int4); -ERROR: RemoveOperator: binary operator '===' taking 'int4' and 'int4' does not exist +ERROR: RemoveOperator: Operator '===' for types 'int4' and 'int4' does not exist -- no such type1 drop operator = (nonesuch); ERROR: parser: argument type missing (use NONE for unary operators)