33 Relids incompatible_relids,
43 Relids incompatible_relids,
71 Relids incompatible_relids,
119 Index security_level,
121 Relids incompatible_relids,
127 restrictinfo->
clause = clause;
128 restrictinfo->orclause = orclause;
130 restrictinfo->pseudoconstant = pseudoconstant;
133 restrictinfo->can_join =
false;
143 if (security_level > 0)
146 restrictinfo->leakproof =
false;
164 restrictinfo->clause_relids =
bms_union(restrictinfo->left_relids,
165 restrictinfo->right_relids);
176 restrictinfo->right_relids))
178 restrictinfo->can_join =
true;
180 Assert(!restrictinfo->pseudoconstant);
186 restrictinfo->left_relids = NULL;
187 restrictinfo->right_relids = NULL;
193 if (required_relids != NULL)
208 root->outer_join_rels);
224 restrictinfo->parent_ec = NULL;
226 restrictinfo->eval_cost.startup = -1;
227 restrictinfo->norm_selec = -1;
228 restrictinfo->outer_selec = -1;
230 restrictinfo->mergeopfamilies =
NIL;
232 restrictinfo->left_ec = NULL;
233 restrictinfo->right_ec = NULL;
234 restrictinfo->left_em = NULL;
235 restrictinfo->right_em = NULL;
236 restrictinfo->scansel_cache =
NIL;
238 restrictinfo->outer_is_left =
false;
242 restrictinfo->left_bucketsize = -1;
243 restrictinfo->right_bucketsize = -1;
244 restrictinfo->left_mcvfreq = -1;
245 restrictinfo->right_mcvfreq = -1;
247 restrictinfo->left_hasheqoperator =
InvalidOid;
248 restrictinfo->right_hasheqoperator =
InvalidOid;
277 Index security_level,
279 Relids incompatible_relids,
369 memcpy(newclause, clause,
sizeof(
OpExpr));
372 newclause->
opno = comm_op;
388 result->left_relids = rinfo->right_relids;
389 result->right_relids = rinfo->left_relids;
390 Assert(result->orclause == NULL);
391 result->left_ec = rinfo->right_ec;
392 result->right_ec = rinfo->left_ec;
393 result->left_em = rinfo->right_em;
394 result->right_em = rinfo->left_em;
395 result->scansel_cache =
NIL;
396 if (rinfo->hashjoinoperator == clause->
opno)
397 result->hashjoinoperator = comm_op;
400 result->left_bucketsize = rinfo->right_bucketsize;
401 result->right_bucketsize = rinfo->left_bucketsize;
402 result->left_mcvfreq = rinfo->right_mcvfreq;
403 result->right_mcvfreq = rinfo->left_mcvfreq;
418 if (restrictinfo->orclause != NULL)
439 restrictinfo->leakproof)
474 foreach(l, restrictinfo_list)
478 Assert(!rinfo->pseudoconstant);
500 foreach(l, restrictinfo_list)
504 if (rinfo->pseudoconstant == pseudoconstant &&
532 foreach(l, restrictinfo_list)
538 if (!rinfo->pseudoconstant &&
545 Assert(!rinfo->pseudoconstant);
679 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)
static RestrictInfo * make_restrictinfo_internal(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)
bool restriction_is_or_clause(RestrictInfo *restrictinfo)
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)