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/cost.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 bool | RestrictInfoIsTidQual (PlannerInfo *root, RestrictInfo *rinfo, RelOptInfo *rel) |
static List * | TidQualFromRestrictInfoList (PlannerInfo *root, List *rlist, RelOptInfo *rel, bool *isCurrentOf) |
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) |
bool | create_tidscan_paths (PlannerInfo *root, RelOptInfo *rel) |
|
static |
Definition at line 426 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().
bool create_tidscan_paths | ( | PlannerInfo * | root, |
RelOptInfo * | rel | ||
) |
Definition at line 498 of file tidpath.c.
References add_path(), RelOptInfo::baserestrictinfo, BuildParameterizedTidPaths(), create_tidrangescan_path(), create_tidscan_path(), ec_member_matches_ctid(), enable_tidscan, 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 481 of file tidpath.c.
References EquivalenceMember::em_expr, IsA, and IsCTIDVar().
Referenced by create_tidscan_paths().
|
static |
Definition at line 77 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 56 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 212 of file tidpath.c.
References RestrictInfo::clause, CurrentOfExpr::cvarno, if(), IsA, and RelOptInfo::relid.
Referenced by RestrictInfoIsTidQual(), and TidQualFromRestrictInfoList().
|
static |
Definition at line 173 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 RestrictInfoIsTidQual().
|
static |
Definition at line 131 of file tidpath.c.
References RestrictInfo::clause, and IsBinaryTidClause().
Referenced by BuildParameterizedTidPaths(), and RestrictInfoIsTidQual().
|
static |
Definition at line 151 of file tidpath.c.
References RestrictInfo::clause, and IsBinaryTidClause().
Referenced by TidRangeQualFromRestrictInfoList().
|
static |
Definition at line 235 of file tidpath.c.
References IsCurrentOfClause(), IsTidEqualAnyClause(), IsTidEqualClause(), restriction_is_securely_promotable(), and root.
Referenced by TidQualFromRestrictInfoList().
|
static |
Definition at line 281 of file tidpath.c.
References Assert, castNode, elog, ERROR, is_andclause(), IsCurrentOfClause(), j, lfirst, lfirst_node, list_concat(), list_length(), list_make1, NIL, RestrictInfoIsTidQual(), restriction_is_or_clause(), and root.
Referenced by create_tidscan_paths().
|
static |
Definition at line 398 of file tidpath.c.
References AMFLAG_HAS_TID_RANGE, RelOptInfo::amflags, IsTidRangeClause(), lappend(), lfirst_node, and NIL.
Referenced by create_tidscan_paths().