60 var->vartype == TIDOID &&
62 var->varnullingrels == NULL &&
99 if (arg1 &&
IsA(arg1,
Var) &&
103 other_relids = rinfo->right_relids;
105 if (!other && arg2 &&
IsA(arg2,
Var) &&
109 other_relids = rinfo->left_relids;
136 if (((
OpExpr *) rinfo->
clause)->opno == TIDEqualOperator)
159 if (opno == TIDLessOperator || opno == TIDLessEqOperator ||
160 opno == TIDGreaterOperator || opno == TIDGreaterEqOperator)
185 if (node->
opno != TIDEqualOperator)
194 if (arg1 &&
IsA(arg1,
Var) &&
241 if (rinfo->pseudoconstant)
288 *isCurrentOf =
false;
303 foreach(
j, ((
BoolExpr *) rinfo->orclause)->args)
312 bool sublistIsCurrentOf;
316 &sublistIsCurrentOf);
317 if (sublistIsCurrentOf)
318 elog(
ERROR,
"IS CURRENT OF within OR clause");
374 if (tidclause == NULL)
450 if (rinfo->pseudoconstant ||
546 if (tidrangequals !=
NIL)
bool bms_is_member(int x, const Bitmapset *a)
Bitmapset * bms_union(const Bitmapset *a, const Bitmapset *b)
Bitmapset * bms_del_member(Bitmapset *a, int x)
#define Assert(condition)
bool contain_volatile_functions(Node *clause)
List * generate_implied_equalities_for_column(PlannerInfo *root, RelOptInfo *rel, ec_matches_callback_type callback, void *callback_arg, Relids prohibited_rels)
if(TABLE==NULL||TABLE_index==NULL)
List * lappend(List *list, void *datum)
List * list_concat(List *list1, const List *list2)
static bool is_andclause(const void *clause)
static bool is_opclause(const void *clause)
#define IsA(nodeptr, _type_)
#define castNode(_type_, nodeptr)
TidPath * create_tidscan_path(PlannerInfo *root, RelOptInfo *rel, List *tidquals, Relids required_outer)
void add_path(RelOptInfo *parent_rel, Path *new_path)
TidRangePath * create_tidrangescan_path(PlannerInfo *root, RelOptInfo *rel, List *tidrangequals, Relids required_outer)
#define AMFLAG_HAS_TID_RANGE
#define lfirst_node(type, lc)
static int list_length(const List *l)
bool restriction_is_or_clause(RestrictInfo *restrictinfo)
bool restriction_is_securely_promotable(RestrictInfo *restrictinfo, RelOptInfo *rel)
bool join_clause_is_movable_to(RestrictInfo *rinfo, RelOptInfo *baserel)
Relids lateral_referencers
#define SelfItemPointerAttributeNumber
static bool IsBinaryTidClause(RestrictInfo *rinfo, RelOptInfo *rel)
static List * TidQualFromRestrictInfoList(PlannerInfo *root, List *rlist, RelOptInfo *rel, bool *isCurrentOf)
static void BuildParameterizedTidPaths(PlannerInfo *root, RelOptInfo *rel, List *clauses)
static bool IsTidEqualClause(RestrictInfo *rinfo, RelOptInfo *rel)
static List * TidRangeQualFromRestrictInfoList(List *rlist, RelOptInfo *rel)
static bool IsCTIDVar(Var *var, RelOptInfo *rel)
static bool IsCurrentOfClause(RestrictInfo *rinfo, RelOptInfo *rel)
static bool RestrictInfoIsTidQual(PlannerInfo *root, RestrictInfo *rinfo, RelOptInfo *rel)
bool create_tidscan_paths(PlannerInfo *root, RelOptInfo *rel)
static bool ec_member_matches_ctid(PlannerInfo *root, RelOptInfo *rel, EquivalenceClass *ec, EquivalenceMember *em, void *arg)
static bool IsTidRangeClause(RestrictInfo *rinfo, RelOptInfo *rel)
static bool IsTidEqualAnyClause(PlannerInfo *root, RestrictInfo *rinfo, RelOptInfo *rel)
Relids pull_varnos(PlannerInfo *root, Node *node)