PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/sysattr.h"
#include "catalog/pg_operator.h"
#include "catalog/pg_type.h"
#include "nodes/nodeFuncs.h"
#include "optimizer/optimizer.h"
#include "optimizer/pathnode.h"
#include "optimizer/paths.h"
#include "optimizer/restrictinfo.h"
Go to the source code of this file.
Functions | |
static bool | IsCTIDVar (Var *var, RelOptInfo *rel) |
static bool | IsBinaryTidClause (RestrictInfo *rinfo, RelOptInfo *rel) |
static bool | IsTidEqualClause (RestrictInfo *rinfo, RelOptInfo *rel) |
static bool | IsTidRangeClause (RestrictInfo *rinfo, RelOptInfo *rel) |
static bool | IsTidEqualAnyClause (PlannerInfo *root, RestrictInfo *rinfo, RelOptInfo *rel) |
static bool | IsCurrentOfClause (RestrictInfo *rinfo, RelOptInfo *rel) |
static List * | TidQualFromRestrictInfo (PlannerInfo *root, RestrictInfo *rinfo, RelOptInfo *rel) |
static List * | TidQualFromRestrictInfoList (PlannerInfo *root, List *rlist, RelOptInfo *rel) |
static List * | TidRangeQualFromRestrictInfoList (List *rlist, RelOptInfo *rel) |
static void | BuildParameterizedTidPaths (PlannerInfo *root, RelOptInfo *rel, List *clauses) |
static bool | ec_member_matches_ctid (PlannerInfo *root, RelOptInfo *rel, EquivalenceClass *ec, EquivalenceMember *em, void *arg) |
void | create_tidscan_paths (PlannerInfo *root, RelOptInfo *rel) |
|
static |
Definition at line 387 of file tidpath.c.
References add_path(), bms_del_member(), bms_union(), create_tidscan_path(), IsTidEqualClause(), join_clause_is_movable_to(), RelOptInfo::lateral_relids, lfirst_node, list_make1, RelOptInfo::relid, RestrictInfo::required_relids, restriction_is_securely_promotable(), and root.
Referenced by create_tidscan_paths().
void create_tidscan_paths | ( | PlannerInfo * | root, |
RelOptInfo * | rel | ||
) |
Definition at line 459 of file tidpath.c.
References add_path(), RelOptInfo::baserestrictinfo, BuildParameterizedTidPaths(), create_tidrangescan_path(), create_tidscan_path(), ec_member_matches_ctid(), generate_implied_equalities_for_column(), RelOptInfo::has_eclass_joins, RelOptInfo::joininfo, RelOptInfo::lateral_referencers, RelOptInfo::lateral_relids, NIL, root, TidQualFromRestrictInfoList(), and TidRangeQualFromRestrictInfoList().
Referenced by set_plain_rel_pathlist().
|
static |
Definition at line 442 of file tidpath.c.
References EquivalenceMember::em_expr, IsA, and IsCTIDVar().
Referenced by create_tidscan_paths().
|
static |
Definition at line 76 of file tidpath.c.
References OpExpr::args, bms_is_member(), RestrictInfo::clause, contain_volatile_functions(), if(), is_opclause(), IsA, IsCTIDVar(), linitial, list_length(), lsecond, and RelOptInfo::relid.
Referenced by IsTidEqualClause(), and IsTidRangeClause().
|
inlinestatic |
Definition at line 55 of file tidpath.c.
References RelOptInfo::relid, SelfItemPointerAttributeNumber, Var::varattno, Var::varlevelsup, and Var::varno.
Referenced by ec_member_matches_ctid(), IsBinaryTidClause(), and IsTidEqualAnyClause().
|
static |
Definition at line 211 of file tidpath.c.
References RestrictInfo::clause, CurrentOfExpr::cvarno, if(), IsA, and RelOptInfo::relid.
Referenced by TidQualFromRestrictInfo().
|
static |
Definition at line 172 of file tidpath.c.
References ScalarArrayOpExpr::args, Assert, bms_is_member(), RestrictInfo::clause, contain_volatile_functions(), if(), IsA, IsCTIDVar(), linitial, list_length(), lsecond, ScalarArrayOpExpr::opno, pull_varnos(), RelOptInfo::relid, root, and ScalarArrayOpExpr::useOr.
Referenced by TidQualFromRestrictInfo().
|
static |
Definition at line 130 of file tidpath.c.
References RestrictInfo::clause, and IsBinaryTidClause().
Referenced by BuildParameterizedTidPaths(), and TidQualFromRestrictInfo().
|
static |
Definition at line 150 of file tidpath.c.
References RestrictInfo::clause, and IsBinaryTidClause().
Referenced by TidRangeQualFromRestrictInfoList().
|
static |
Definition at line 239 of file tidpath.c.
References IsCurrentOfClause(), IsTidEqualAnyClause(), IsTidEqualClause(), list_make1, NIL, restriction_is_securely_promotable(), and root.
Referenced by TidQualFromRestrictInfoList().
|
static |
Definition at line 276 of file tidpath.c.
References Assert, castNode, is_andclause(), j, lfirst, lfirst_node, list_concat(), NIL, restriction_is_or_clause(), root, and TidQualFromRestrictInfo().
Referenced by create_tidscan_paths().
|
static |
Definition at line 359 of file tidpath.c.
References AMFLAG_HAS_TID_RANGE, RelOptInfo::amflags, IsTidRangeClause(), lappend(), lfirst_node, and NIL.
Referenced by create_tidscan_paths().