00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef PARSE_OPER_H
00015 #define PARSE_OPER_H
00016
00017 #include "access/htup.h"
00018 #include "parser/parse_node.h"
00019
00020
00021 typedef HeapTuple Operator;
00022
00023
00024 extern Oid LookupOperName(ParseState *pstate, List *opername,
00025 Oid oprleft, Oid oprright,
00026 bool noError, int location);
00027 extern Oid LookupOperNameTypeNames(ParseState *pstate, List *opername,
00028 TypeName *oprleft, TypeName *oprright,
00029 bool noError, int location);
00030
00031
00032
00033 extern Operator oper(ParseState *pstate, List *op, Oid arg1, Oid arg2,
00034 bool noError, int location);
00035 extern Operator right_oper(ParseState *pstate, List *op, Oid arg,
00036 bool noError, int location);
00037 extern Operator left_oper(ParseState *pstate, List *op, Oid arg,
00038 bool noError, int location);
00039
00040
00041
00042 extern Operator compatible_oper(ParseState *pstate, List *op,
00043 Oid arg1, Oid arg2,
00044 bool noError, int location);
00045
00046
00047
00048
00049 extern void get_sort_group_operators(Oid argtype,
00050 bool needLT, bool needEQ, bool needGT,
00051 Oid *ltOpr, Oid *eqOpr, Oid *gtOpr,
00052 bool *isHashable);
00053
00054
00055 extern Oid compatible_oper_opid(List *op, Oid arg1, Oid arg2, bool noError);
00056
00057
00058 extern Oid oprid(Operator op);
00059 extern Oid oprfuncid(Operator op);
00060
00061
00062 extern Expr *make_op(ParseState *pstate, List *opname,
00063 Node *ltree, Node *rtree, int location);
00064 extern Expr *make_scalar_array_op(ParseState *pstate, List *opname,
00065 bool useOr,
00066 Node *ltree, Node *rtree, int location);
00067
00068 #endif