PostgreSQL Source Code
git master
|
Go to the source code of this file.
void add_row_identity_columns | ( | PlannerInfo * | root, |
Index | rtindex, | ||
RangeTblEntry * | target_rte, | ||
Relation | target_relation | ||
) |
Definition at line 887 of file appendinfo.c.
References add_row_identity_var(), FdwRoutine::AddForeignUpdateTargets, Assert, CMD_DELETE, CMD_MERGE, CMD_UPDATE, GetFdwRoutineForRelation(), InvalidAttrNumber, InvalidOid, makeVar(), RelationData::rd_rel, root, SelfItemPointerAttributeNumber, TriggerDesc::trig_delete_after_row, TriggerDesc::trig_delete_before_row, and RelationData::trigdesc.
Referenced by distribute_row_identity_vars(), expand_single_inheritance_child(), and preprocess_targetlist().
void add_row_identity_var | ( | PlannerInfo * | root, |
Var * | orig_var, | ||
Index | rtindex, | ||
const char * | rowid_name | ||
) |
Definition at line 792 of file appendinfo.c.
References Assert, bms_add_member(), bms_is_member(), bms_make_singleton(), copyObject, elog, equal(), ERROR, exprType(), exprTypmod(), get_typavgwidth(), IsA, lappend(), lfirst, list_length(), makeNode, makeTargetEntry(), pstrdup(), root, ROWID_VAR, RowIdentityVarInfo::rowidname, RowIdentityVarInfo::rowidrels, RowIdentityVarInfo::rowidvar, RowIdentityVarInfo::rowidwidth, Var::varattno, Var::varlevelsup, and Var::varno.
Referenced by add_row_identity_columns(), expand_single_inheritance_child(), and postgresAddForeignUpdateTargets().
Node* adjust_appendrel_attrs | ( | PlannerInfo * | root, |
Node * | node, | ||
int | nappinfos, | ||
AppendRelInfo ** | appinfos | ||
) |
Definition at line 200 of file appendinfo.c.
References adjust_appendrel_attrs_mutator(), Assert, context, IsA, and root.
Referenced by add_child_join_rel_equivalences(), add_child_rel_equivalences(), adjust_appendrel_attrs_multilevel(), apply_child_basequals(), apply_scanjoin_target_to_paths(), build_child_join_rel(), build_child_join_reltarget(), build_child_join_sjinfo(), create_partitionwise_grouping_paths(), make_partitionedrel_pruneinfo(), set_append_rel_size(), and try_partitionwise_join().
Node* adjust_appendrel_attrs_multilevel | ( | PlannerInfo * | root, |
Node * | node, | ||
RelOptInfo * | childrel, | ||
RelOptInfo * | parentrel | ||
) |
Definition at line 524 of file appendinfo.c.
References adjust_appendrel_attrs(), elog, ERROR, find_appinfos_by_relids(), pfree(), RelOptInfo::relids, and root.
Referenced by add_child_join_rel_equivalences(), add_child_rel_equivalences(), generate_join_implied_equalities_broken(), get_translated_update_targetlist(), grouping_planner(), and make_partitionedrel_pruneinfo().
Relids adjust_child_relids | ( | Relids | relids, |
int | nappinfos, | ||
AppendRelInfo ** | appinfos | ||
) |
Definition at line 557 of file appendinfo.c.
References bms_add_member(), bms_copy(), bms_del_member(), bms_is_member(), AppendRelInfo::child_relid, and AppendRelInfo::parent_relid.
Referenced by adjust_appendrel_attrs_mutator(), adjust_child_relids_multilevel(), build_child_join_rel(), build_child_join_sjinfo(), and try_partitionwise_join().
Relids adjust_child_relids_multilevel | ( | PlannerInfo * | root, |
Relids | relids, | ||
RelOptInfo * | childrel, | ||
RelOptInfo * | parentrel | ||
) |
Definition at line 591 of file appendinfo.c.
References adjust_child_relids(), bms_overlap(), elog, ERROR, find_appinfos_by_relids(), pfree(), RelOptInfo::relids, and root.
Referenced by reparameterize_path_by_child().
List* adjust_inherited_attnums | ( | List * | attnums, |
AppendRelInfo * | context | ||
) |
Definition at line 631 of file appendinfo.c.
References Assert, context, elog, ERROR, get_rel_name(), IsA, lappend_int(), lfirst_int, list_length(), list_nth(), NIL, OidIsValid, and Var::varattno.
Referenced by adjust_inherited_attnums_multilevel().
List* adjust_inherited_attnums_multilevel | ( | PlannerInfo * | root, |
List * | attnums, | ||
Index | child_relid, | ||
Index | top_parent_relid | ||
) |
Definition at line 665 of file appendinfo.c.
References adjust_inherited_attnums(), elog, ERROR, AppendRelInfo::parent_relid, and root.
Referenced by get_translated_update_targetlist(), and grouping_planner().
void distribute_row_identity_vars | ( | PlannerInfo * | root | ) |
Definition at line 968 of file appendinfo.c.
References add_row_identity_columns(), Assert, build_base_rel_tlists(), CMD_DELETE, CMD_MERGE, CMD_UPDATE, copyObject, TargetEntry::expr, PathTarget::exprs, find_base_rel(), if(), RangeTblEntry::inh, IsA, lappend(), lfirst, NIL, NoLock, parse(), RangeTblEntry::relid, RelOptInfo::reltarget, root, ROWID_VAR, rt_fetch, table_close(), table_open(), and Var::varno.
Referenced by query_planner().
AppendRelInfo** find_appinfos_by_relids | ( | PlannerInfo * | root, |
Relids | relids, | ||
int * | nappinfos | ||
) |
Definition at line 736 of file appendinfo.c.
References bms_next_member(), bms_num_members(), elog, ERROR, find_base_rel_ignore_join(), i, palloc(), and root.
Referenced by adjust_appendrel_attrs_multilevel(), adjust_child_relids_multilevel(), apply_scanjoin_target_to_paths(), build_child_join_sjinfo(), create_partitionwise_grouping_paths(), make_partitionedrel_pruneinfo(), and try_partitionwise_join().
void get_translated_update_targetlist | ( | PlannerInfo * | root, |
Index | relid, | ||
List ** | processed_tlist, | ||
List ** | update_colnos | ||
) |
Definition at line 693 of file appendinfo.c.
References adjust_appendrel_attrs_multilevel(), adjust_inherited_attnums_multilevel(), Assert, bms_is_member(), CMD_UPDATE, copyObject, find_base_rel(), and root.
Referenced by postgresPlanDirectModify().
AppendRelInfo* make_append_rel_info | ( | Relation | parentrel, |
Relation | childrel, | ||
Index | parentRTindex, | ||
Index | childRTindex | ||
) |
Definition at line 51 of file appendinfo.c.
References AppendRelInfo::child_relid, AppendRelInfo::child_reltype, make_inh_translation_list(), makeNode, AppendRelInfo::parent_relid, AppendRelInfo::parent_reloid, AppendRelInfo::parent_reltype, RelationData::rd_rel, and RelationGetRelid.
Referenced by expand_single_inheritance_child().