gooderp18绿色标准版
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

68 行
2.5KB

  1. /*-------------------------------------------------------------------------
  2. *
  3. * parse_oper.h
  4. * handle operator things for parser
  5. *
  6. *
  7. * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
  8. * Portions Copyright (c) 1994, Regents of the University of California
  9. *
  10. * src/include/parser/parse_oper.h
  11. *
  12. *-------------------------------------------------------------------------
  13. */
  14. #ifndef PARSE_OPER_H
  15. #define PARSE_OPER_H
  16. #include "access/htup.h"
  17. #include "nodes/parsenodes.h"
  18. #include "parser/parse_node.h"
  19. typedef HeapTuple Operator;
  20. /* Routines to look up an operator given name and exact input type(s) */
  21. extern Oid LookupOperName(ParseState *pstate, List *opername,
  22. Oid oprleft, Oid oprright,
  23. bool noError, int location);
  24. extern Oid LookupOperWithArgs(ObjectWithArgs *oper, bool noError);
  25. /* Routines to find operators matching a name and given input types */
  26. /* NB: the selected operator may require coercion of the input types! */
  27. extern Operator oper(ParseState *pstate, List *op, Oid arg1, Oid arg2,
  28. bool noError, int location);
  29. extern Operator right_oper(ParseState *pstate, List *op, Oid arg,
  30. bool noError, int location);
  31. extern Operator left_oper(ParseState *pstate, List *op, Oid arg,
  32. bool noError, int location);
  33. /* Routines to find operators that DO NOT require coercion --- ie, their */
  34. /* input types are either exactly as given, or binary-compatible */
  35. extern Operator compatible_oper(ParseState *pstate, List *op,
  36. Oid arg1, Oid arg2,
  37. bool noError, int location);
  38. /* currently no need for compatible_left_oper/compatible_right_oper */
  39. /* Routines for identifying "<", "=", ">" operators for a type */
  40. extern void get_sort_group_operators(Oid argtype,
  41. bool needLT, bool needEQ, bool needGT,
  42. Oid *ltOpr, Oid *eqOpr, Oid *gtOpr,
  43. bool *isHashable);
  44. /* Convenience routines for common calls on the above */
  45. extern Oid compatible_oper_opid(List *op, Oid arg1, Oid arg2, bool noError);
  46. /* Extract operator OID or underlying-function OID from an Operator tuple */
  47. extern Oid oprid(Operator op);
  48. extern Oid oprfuncid(Operator op);
  49. /* Build expression tree for an operator invocation */
  50. extern Expr *make_op(ParseState *pstate, List *opname,
  51. Node *ltree, Node *rtree, Node *last_srf, int location);
  52. extern Expr *make_scalar_array_op(ParseState *pstate, List *opname,
  53. bool useOr,
  54. Node *ltree, Node *rtree, int location);
  55. #endif /* PARSE_OPER_H */
上海开阖软件有限公司 沪ICP备12045867号-1