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/clauses.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 388 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, and restriction_is_securely_promotable().
Referenced by create_tidscan_paths().
void create_tidscan_paths | ( | PlannerInfo * | root, |
RelOptInfo * | rel | ||
) |
Definition at line 460 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, TidQualFromRestrictInfoList(), and TidRangeQualFromRestrictInfoList().
Referenced by set_plain_rel_pathlist().
|
static |
Definition at line 443 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 TidQualFromRestrictInfo().
|
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, and ScalarArrayOpExpr::useOr.
Referenced by TidQualFromRestrictInfo().
|
static |
Definition at line 131 of file tidpath.c.
References RestrictInfo::clause, and IsBinaryTidClause().
Referenced by BuildParameterizedTidPaths(), and TidQualFromRestrictInfo().
|
static |
Definition at line 151 of file tidpath.c.
References RestrictInfo::clause, and IsBinaryTidClause().
Referenced by TidRangeQualFromRestrictInfoList().
|
static |
Definition at line 240 of file tidpath.c.
References IsCurrentOfClause(), IsTidEqualAnyClause(), IsTidEqualClause(), list_make1, NIL, and restriction_is_securely_promotable().
Referenced by TidQualFromRestrictInfoList().
|
static |
Definition at line 277 of file tidpath.c.
References Assert(), castNode, is_andclause(), j, lfirst, lfirst_node, list_concat(), NIL, restriction_is_or_clause(), and TidQualFromRestrictInfo().
Referenced by create_tidscan_paths().
|
static |
Definition at line 360 of file tidpath.c.
References AMFLAG_HAS_TID_RANGE, RelOptInfo::amflags, IsTidRangeClause(), lappend(), lfirst_node, and NIL.
Referenced by create_tidscan_paths().