32 Relids incompatible_relids,
60 Relids incompatible_relids,
110 Index security_level,
112 Relids incompatible_relids,
118 restrictinfo->
clause = clause;
119 restrictinfo->orclause = orclause;
121 restrictinfo->pseudoconstant = pseudoconstant;
124 restrictinfo->can_join =
false;
134 if (security_level > 0)
137 restrictinfo->leakproof =
false;
155 restrictinfo->clause_relids =
bms_union(restrictinfo->left_relids,
156 restrictinfo->right_relids);
167 restrictinfo->right_relids))
169 restrictinfo->can_join =
true;
171 Assert(!restrictinfo->pseudoconstant);
177 restrictinfo->left_relids = NULL;
178 restrictinfo->right_relids = NULL;
184 if (required_relids != NULL)
199 root->outer_join_rels);
215 restrictinfo->parent_ec = NULL;
217 restrictinfo->eval_cost.startup = -1;
218 restrictinfo->norm_selec = -1;
219 restrictinfo->outer_selec = -1;
221 restrictinfo->mergeopfamilies =
NIL;
223 restrictinfo->left_ec = NULL;
224 restrictinfo->right_ec = NULL;
225 restrictinfo->left_em = NULL;
226 restrictinfo->right_em = NULL;
227 restrictinfo->scansel_cache =
NIL;
229 restrictinfo->outer_is_left =
false;
233 restrictinfo->left_bucketsize = -1;
234 restrictinfo->right_bucketsize = -1;
235 restrictinfo->left_mcvfreq = -1;
236 restrictinfo->right_mcvfreq = -1;
238 restrictinfo->left_hasheqoperator =
InvalidOid;
239 restrictinfo->right_hasheqoperator =
InvalidOid;
268 Index security_level,
270 Relids incompatible_relids,
360 memcpy(newclause, clause,
sizeof(
OpExpr));
363 newclause->
opno = comm_op;
379 result->left_relids = rinfo->right_relids;
380 result->right_relids = rinfo->left_relids;
381 Assert(result->orclause == NULL);
382 result->left_ec = rinfo->right_ec;
383 result->right_ec = rinfo->left_ec;
384 result->left_em = rinfo->right_em;
385 result->right_em = rinfo->left_em;
386 result->scansel_cache =
NIL;
387 if (rinfo->hashjoinoperator == clause->
opno)
388 result->hashjoinoperator = comm_op;
391 result->left_bucketsize = rinfo->right_bucketsize;
392 result->right_bucketsize = rinfo->left_bucketsize;
393 result->left_mcvfreq = rinfo->right_mcvfreq;
394 result->right_mcvfreq = rinfo->left_mcvfreq;
409 if (restrictinfo->orclause != NULL)
430 restrictinfo->leakproof)
465 foreach(l, restrictinfo_list)
469 Assert(!rinfo->pseudoconstant);
491 foreach(l, restrictinfo_list)
495 if (rinfo->pseudoconstant == pseudoconstant &&
523 foreach(l, restrictinfo_list)
529 if (!rinfo->pseudoconstant &&
536 Assert(!rinfo->pseudoconstant);
670 if (!
bms_overlap(currentrelids, rinfo->clause_relids))
bool bms_is_subset(const Bitmapset *a, const Bitmapset *b)
void bms_free(Bitmapset *a)
int bms_num_members(const Bitmapset *a)
bool bms_is_member(int x, const Bitmapset *a)
Bitmapset * bms_union(const Bitmapset *a, const Bitmapset *b)
Bitmapset * bms_difference(const Bitmapset *a, const Bitmapset *b)
bool bms_overlap(const Bitmapset *a, const Bitmapset *b)
#define Assert(condition)
bool contain_leaked_vars(Node *clause)
List * lappend(List *list, void *datum)
Expr * make_andclause(List *andclauses)
Expr * make_orclause(List *orclauses)
static bool is_andclause(const void *clause)
static bool is_orclause(const void *clause)
static bool is_opclause(const void *clause)
static Node * get_rightop(const void *clause)
static Node * get_leftop(const void *clause)
#define IsA(nodeptr, _type_)
#define castNode(_type_, nodeptr)
#define RINFO_IS_PUSHED_DOWN(rinfo, joinrelids)
#define lfirst_node(type, lc)
static int list_length(const List *l)
#define list_make2(x1, x2)
static bool DatumGetBool(Datum X)
List * get_actual_clauses(List *restrictinfo_list)
bool restriction_is_or_clause(RestrictInfo *restrictinfo)
RestrictInfo * make_plain_restrictinfo(PlannerInfo *root, Expr *clause, Expr *orclause, bool is_pushed_down, bool has_clone, bool is_clone, bool pseudoconstant, Index security_level, Relids required_relids, Relids incompatible_relids, Relids outer_relids)
void extract_actual_join_clauses(List *restrictinfo_list, Relids joinrelids, List **joinquals, List **otherquals)
RestrictInfo * commute_restrictinfo(RestrictInfo *rinfo, Oid comm_op)
bool restriction_is_securely_promotable(RestrictInfo *restrictinfo, RelOptInfo *rel)
static Expr * make_sub_restrictinfos(PlannerInfo *root, Expr *clause, bool is_pushed_down, bool has_clone, bool is_clone, bool pseudoconstant, Index security_level, Relids required_relids, Relids incompatible_relids, Relids outer_relids)
bool join_clause_is_movable_into(RestrictInfo *rinfo, Relids currentrelids, Relids current_and_outer)
List * extract_actual_clauses(List *restrictinfo_list, bool pseudoconstant)
RestrictInfo * make_restrictinfo(PlannerInfo *root, Expr *clause, bool is_pushed_down, bool has_clone, bool is_clone, bool pseudoconstant, Index security_level, Relids required_relids, Relids incompatible_relids, Relids outer_relids)
bool join_clause_is_movable_to(RestrictInfo *rinfo, RelOptInfo *baserel)
static bool rinfo_is_constant_true(RestrictInfo *rinfo)
Relids lateral_referencers
Index baserestrict_min_security
Relids incompatible_relids
Relids pull_varnos(PlannerInfo *root, Node *node)