restrictinfo.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*-------------------------------------------------------------------------
  2. *
  3. * restrictinfo.h
  4. * prototypes for restrictinfo.c.
  5. *
  6. *
  7. * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
  8. * Portions Copyright (c) 1994, Regents of the University of California
  9. *
  10. * src/include/optimizer/restrictinfo.h
  11. *
  12. *-------------------------------------------------------------------------
  13. */
  14. #ifndef RESTRICTINFO_H
  15. #define RESTRICTINFO_H
  16. #include "nodes/relation.h"
  17. /* Convenience macro for the common case of a valid-everywhere qual */
  18. #define make_simple_restrictinfo(clause) \
  19. make_restrictinfo(clause, true, false, false, NULL, NULL, NULL)
  20. extern RestrictInfo *make_restrictinfo(Expr *clause,
  21. bool is_pushed_down,
  22. bool outerjoin_delayed,
  23. bool pseudoconstant,
  24. Relids required_relids,
  25. Relids outer_relids,
  26. Relids nullable_relids);
  27. extern List *make_restrictinfos_from_actual_clauses(PlannerInfo *root,
  28. List *clause_list);
  29. extern bool restriction_is_or_clause(RestrictInfo *restrictinfo);
  30. extern List *get_actual_clauses(List *restrictinfo_list);
  31. extern List *get_all_actual_clauses(List *restrictinfo_list);
  32. extern List *extract_actual_clauses(List *restrictinfo_list,
  33. bool pseudoconstant);
  34. extern void extract_actual_join_clauses(List *restrictinfo_list,
  35. List **joinquals,
  36. List **otherquals);
  37. extern bool join_clause_is_movable_to(RestrictInfo *rinfo, RelOptInfo *baserel);
  38. extern bool join_clause_is_movable_into(RestrictInfo *rinfo,
  39. Relids currentrelids,
  40. Relids current_and_outer);
  41. #endif /* RESTRICTINFO_H */