PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/attmap.h"
#include "access/genam.h"
#include "access/htup_details.h"
#include "access/sysattr.h"
#include "access/table.h"
#include "catalog/indexing.h"
#include "catalog/partition.h"
#include "catalog/pg_inherits.h"
#include "catalog/pg_partitioned_table.h"
#include "nodes/makefuncs.h"
#include "optimizer/optimizer.h"
#include "rewrite/rewriteManip.h"
#include "utils/fmgroids.h"
#include "utils/partcache.h"
#include "utils/rel.h"
#include "utils/syscache.h"
Go to the source code of this file.
Functions | |
static Oid | get_partition_parent_worker (Relation inhRel, Oid relid, bool *detach_pending) |
static void | get_partition_ancestors_worker (Relation inhRel, Oid relid, List **ancestors) |
Oid | get_partition_parent (Oid relid, bool even_if_detached) |
List * | get_partition_ancestors (Oid relid) |
Oid | index_get_partition (Relation partition, Oid indexId) |
List * | map_partition_varattnos (List *expr, int fromrel_varno, Relation to_rel, Relation from_rel) |
bool | has_partition_attrs (Relation rel, Bitmapset *attnums, bool *used_in_expr) |
Oid | get_default_partition_oid (Oid parentId) |
void | update_default_partition_oid (Oid parentId, Oid defaultPartId) |
List * | get_proposed_default_constraint (List *new_part_constraints) |
Definition at line 315 of file partition.c.
References GETSTRUCT, HeapTupleIsValid, InvalidOid, ObjectIdGetDatum(), ReleaseSysCache(), and SearchSysCache1().
Referenced by heap_drop_with_catalog(), and RelationBuildPartitionDesc().
Definition at line 134 of file partition.c.
References AccessShareLock, get_partition_ancestors_worker(), NIL, table_close(), and table_open().
Referenced by ExecGetAncestorResultRels(), ExecInitPartitionInfo(), filter_partitions(), get_rel_sync_entry(), getIdentitySequence(), index_concurrently_swap(), pg_partition_ancestors(), pg_partition_root(), pg_partition_tree(), and RelationBuildPublicationDesc().
Definition at line 153 of file partition.c.
References get_partition_parent_worker(), InvalidOid, and lappend_oid().
Referenced by get_partition_ancestors().
Definition at line 53 of file partition.c.
References AccessShareLock, elog, ERROR, get_partition_parent_worker(), OidIsValid, table_close(), and table_open().
Referenced by ATExecAttachPartitionIdx(), ATExecDropNotNull(), DetachPartitionFinalize(), generate_partition_qual(), heap_drop_with_catalog(), index_get_partition(), RangeVarCallbackForDropRelation(), renametrig(), and validatePartitionedIndex().
Definition at line 85 of file partition.c.
References BTEqualStrategyNumber, GETSTRUCT, HeapTupleIsValid, Int32GetDatum(), InvalidOid, sort-test::key, ObjectIdGetDatum(), ScanKeyInit(), systable_beginscan(), systable_endscan(), and systable_getnext().
Referenced by get_partition_ancestors_worker(), and get_partition_parent().
Definition at line 370 of file partition.c.
References canonicalize_qual(), eval_const_expressions(), list_make1, make_ands_explicit(), make_ands_implicit(), makeBoolExpr(), and NOT_EXPR.
Referenced by ATExecAttachPartition(), and check_default_partition_contents().
Definition at line 255 of file partition.c.
References bms_is_member(), bms_overlap(), FirstLowInvalidHeapAttributeNumber, get_partition_col_attnum(), get_partition_exprs(), get_partition_natts(), i, sort-test::key, lfirst, list_head(), lnext(), pull_varattnos(), RelationData::rd_rel, and RelationGetPartitionKey().
Referenced by ATExecDropColumn(), ATPrepAlterColumnType(), and expand_partitioned_rtentry().
Definition at line 176 of file partition.c.
References elog, ERROR, get_partition_parent(), GETSTRUCT, HeapTupleIsValid, InvalidOid, lfirst_oid, list_free(), ObjectIdGetDatum(), RelationGetIndexList(), ReleaseSysCache(), and SearchSysCache1().
Referenced by addFkRecurseReferenced(), CloneFkReferenced(), and refuseDupeIndexAttach().
List* map_partition_varattnos | ( | List * | expr, |
int | fromrel_varno, | ||
Relation | to_rel, | ||
Relation | from_rel | ||
) |
Definition at line 222 of file partition.c.
References build_attrmap_by_name(), map_variable_attnos(), NIL, RelationGetDescr, and RelationGetForm.
Referenced by ATExecAttachPartition(), check_default_partition_contents(), CloneRowTriggersToPartition(), CreateTriggerFiringOn(), generate_partition_qual(), and QueuePartitionConstraintValidation().
Definition at line 340 of file partition.c.
References CatalogTupleUpdate(), elog, ERROR, GETSTRUCT, heap_freetuple(), HeapTupleIsValid, ObjectIdGetDatum(), RowExclusiveLock, SearchSysCacheCopy1, HeapTupleData::t_self, table_close(), and table_open().
Referenced by DetachPartitionFinalize(), heap_drop_with_catalog(), and StorePartitionBound().