|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "access/sysattr.h"#include "access/table.h"#include "catalog/partition.h"#include "catalog/pg_inherits.h"#include "catalog/pg_type.h"#include "miscadmin.h"#include "nodes/makefuncs.h"#include "optimizer/appendinfo.h"#include "optimizer/inherit.h"#include "optimizer/optimizer.h"#include "optimizer/pathnode.h"#include "optimizer/plancat.h"#include "optimizer/planmain.h"#include "optimizer/planner.h"#include "optimizer/prep.h"#include "optimizer/restrictinfo.h"#include "parser/parsetree.h"#include "parser/parse_relation.h"#include "partitioning/partdesc.h"#include "partitioning/partprune.h"#include "utils/rel.h"
Go to the source code of this file.
| bool apply_child_basequals | ( | PlannerInfo * | root, |
| RelOptInfo * | parentrel, | ||
| RelOptInfo * | childrel, | ||
| RangeTblEntry * | childRTE, | ||
| AppendRelInfo * | appinfo | ||
| ) |
Definition at line 838 of file inherit.c.
References adjust_appendrel_attrs(), Assert(), RelOptInfo::baserestrict_min_security, RelOptInfo::baserestrictinfo, RestrictInfo::clause, contain_vars_of_level(), contain_volatile_functions(), DatumGetBool(), eval_const_expressions(), RestrictInfo::has_clone, RestrictInfo::is_clone, RestrictInfo::is_pushed_down, IsA, lappend(), lfirst, make_ands_implicit(), make_restrictinfo(), Min, NIL, restriction_is_always_false(), restriction_is_always_true(), root, and RestrictInfo::security_level.
Referenced by build_simple_rel().
|
static |
Definition at line 795 of file inherit.c.
References Assert(), build_simple_rel(), AppendRelInfo::child_relid, expand_inherited_rtentry(), RangeTblEntry::inh, lfirst, AppendRelInfo::parent_relid, and root.
Referenced by expand_inherited_rtentry().
| void expand_inherited_rtentry | ( | PlannerInfo * | root, |
| RelOptInfo * | rel, | ||
| RangeTblEntry * | rte, | ||
| Index | rti | ||
| ) |
Definition at line 86 of file inherit.c.
References add_vars_to_targetlist(), PlanRowMark::allMarkTypes, Assert(), bms_make_singleton(), build_simple_rel(), expand_appendrel_subquery(), expand_partitioned_rtentry(), expand_planner_arrays(), expand_single_inheritance_child(), find_all_inheritors(), get_plan_rowmark(), getRTEPermissionInfo(), RangeTblEntry::inh, InvalidOid, PlanRowMark::isParent, lappend(), lfirst_oid, linitial_oid, list_length(), makeTargetEntry(), makeVar(), makeWholeRowVar(), NIL, NoLock, planner_rt_fetch, pstrdup(), RelationData::rd_rel, RELATION_IS_OTHER_TEMP, root, ROW_MARK_COPY, PlanRowMark::rowmarkId, RTE_RELATION, RTE_SUBQUERY, RangeTblEntry::rtekind, PlanRowMark::rti, SelfItemPointerAttributeNumber, snprintf, table_close(), table_open(), TableOidAttributeNumber, and RTEPermissionInfo::updatedCols.
Referenced by add_other_rels_to_query(), and expand_appendrel_subquery().
|
static |
Definition at line 318 of file inherit.c.
References RelOptInfo::all_partrels, Assert(), bms_add_members(), bms_del_member(), bms_next_member(), bms_num_members(), build_simple_rel(), check_stack_depth(), elog, ERROR, expand_partitioned_rtentry(), expand_planner_arrays(), expand_single_inheritance_child(), i, RangeTblEntry::inh, RelOptInfo::live_parts, NoLock, RelOptInfo::nparts, PartitionDescData::nparts, PartitionDescData::oids, palloc0(), PartitionDirectoryLookup(), prune_append_rel_partitions(), RelationData::rd_rel, RELATION_IS_OTHER_TEMP, RelOptInfo::relids, root, table_close(), translate_col_privs(), AppendRelInfo::translated_vars, and try_table_open().
Referenced by expand_inherited_rtentry(), and expand_partitioned_rtentry().
|
static |
Definition at line 451 of file inherit.c.
References add_row_identity_columns(), add_row_identity_var(), PlanRowMark::allMarkTypes, Assert(), attname, bms_add_member(), bms_is_member(), copyObject, get_relation_notnullatts(), RangeTblEntry::inh, InvalidOid, PlanRowMark::isParent, lappend(), list_length(), list_nth(), make_append_rel_info(), makeAlias(), makeNode, makeString(), makeVar(), PlanRowMark::markType, NameStr, TupleDescData::natts, NIL, parse(), PlanRowMark::prti, pstrdup(), RelationData::rd_rel, RelationGetDescr, RelationGetRelid, root, PlanRowMark::rowmarkId, RTE_RELATION, RangeTblEntry::rtekind, PlanRowMark::rti, select_rowmark_type(), PlanRowMark::strength, strVal, TableOidAttributeNumber, RangeTblEntry::tablesample, TupleDescAttr(), and PlanRowMark::waitPolicy.
Referenced by expand_inherited_rtentry(), and expand_partitioned_rtentry().
| Bitmapset * get_rel_all_updated_cols | ( | PlannerInfo * | root, |
| RelOptInfo * | rel | ||
| ) |
Definition at line 652 of file inherit.c.
References Assert(), bms_union(), CMD_UPDATE, find_base_rel(), get_dependent_generated_columns(), getRTEPermissionInfo(), IS_OTHER_REL, IS_SIMPLE_REL, planner_rt_fetch, RelOptInfo::relid, root, translate_col_privs_multilevel(), and RTEPermissionInfo::updatedCols.
Referenced by postgresPlanForeignModify().
|
static |
Definition at line 706 of file inherit.c.
References bms_add_member(), bms_is_member(), FirstLowInvalidHeapAttributeNumber, InvalidAttrNumber, lfirst_node, and Var::varattno.
Referenced by expand_partitioned_rtentry(), and translate_col_privs_multilevel().
|
static |
Definition at line 756 of file inherit.c.
References Assert(), elog, ERROR, RelOptInfo::relid, root, translate_col_privs(), translate_col_privs_multilevel(), and AppendRelInfo::translated_vars.
Referenced by get_rel_all_updated_cols(), and translate_col_privs_multilevel().