|
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, RestrictInfo::clause, contain_vars_of_level(), contain_volatile_functions(), DatumGetBool(), eval_const_expressions(), fb(), 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(), fb(), lfirst, 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(), Assert, bms_make_singleton(), build_simple_rel(), expand_appendrel_subquery(), expand_partitioned_rtentry(), expand_planner_arrays(), expand_single_inheritance_child(), fb(), find_all_inheritors(), get_plan_rowmark(), getRTEPermissionInfo(), InvalidOid, lappend(), lfirst_oid, linitial_oid, list_length(), makeTargetEntry(), makeVar(), makeWholeRowVar(), NIL, NoLock, planner_rt_fetch, pstrdup(), RELATION_IS_OTHER_TEMP, root, ROW_MARK_COPY, RTE_RELATION, RTE_SUBQUERY, SelfItemPointerAttributeNumber, snprintf, table_close(), table_open(), and TableOidAttributeNumber.
Referenced by add_other_rels_to_query(), and expand_appendrel_subquery().
|
static |
Definition at line 318 of file inherit.c.
References 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(), fb(), i, NoLock, PartitionDescData::nparts, PartitionDescData::oids, palloc0(), PartitionDirectoryLookup(), prune_append_rel_partitions(), RELATION_IS_OTHER_TEMP, root, table_close(), translate_col_privs(), 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(), Assert, attname, bms_add_member(), bms_is_member(), copyObject, fb(), get_relation_notnullatts(), InvalidOid, lappend(), list_length(), list_nth(), make_append_rel_info(), makeAlias(), makeNode, makeString(), makeVar(), NameStr, NIL, parse(), pstrdup(), RelationGetDescr, RelationGetRelid, root, RTE_RELATION, select_rowmark_type(), strVal, TableOidAttributeNumber, and TupleDescAttr().
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, fb(), find_base_rel(), get_dependent_generated_columns(), getRTEPermissionInfo(), IS_OTHER_REL, IS_SIMPLE_REL, planner_rt_fetch, RelOptInfo::relid, root, and translate_col_privs_multilevel().
Referenced by postgresPlanForeignModify().
|
static |
Definition at line 706 of file inherit.c.
References bms_add_member(), bms_is_member(), fb(), 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, fb(), RelOptInfo::relid, root, translate_col_privs(), and translate_col_privs_multilevel().
Referenced by get_rel_all_updated_cols(), and translate_col_privs_multilevel().