aboutsummaryrefslogtreecommitdiff
path: root/src/include/parser/parse_oper.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/parser/parse_oper.h')
-rw-r--r--src/include/parser/parse_oper.h24
1 files changed, 19 insertions, 5 deletions
diff --git a/src/include/parser/parse_oper.h b/src/include/parser/parse_oper.h
index 6867addea51..069a9d5be27 100644
--- a/src/include/parser/parse_oper.h
+++ b/src/include/parser/parse_oper.h
@@ -1,13 +1,13 @@
/*-------------------------------------------------------------------------
*
- * catalog_utils.h
+ * parse_oper.h
*
*
*
* 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.13 2001/01/24 19:43:27 momjian Exp $
+ * $Id: parse_oper.h,v 1.14 2001/02/16 03:16:58 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -18,13 +18,27 @@
typedef HeapTuple Operator;
+/* 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 Oid oper_oid(char *op, Oid arg1, Oid arg2, bool noError);
-extern Oid oprid(Operator op);
+/* 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);
+/* 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 any_ordering_op(Oid restype);
+/* Convenience routine that packages a specific call on compatible_oper */
+extern Oid any_ordering_op(Oid argtype);
+
+/* Extract operator OID or underlying-function OID from an Operator tuple */
+extern Oid oprid(Operator op);
+extern Oid oprfuncid(Operator op);
#endif /* PARSE_OPER_H */