PostgreSQL Source Code
git master
|
#include "catalog/genbki.h"
#include "catalog/pg_inherits_d.h"
#include "nodes/pg_list.h"
#include "storage/lock.h"
Go to the source code of this file.
Typedefs | |
typedef FormData_pg_inherits * | Form_pg_inherits |
Functions | |
CATALOG (pg_inherits, 2611, InheritsRelationId) | |
DECLARE_UNIQUE_INDEX_PKEY (pg_inherits_relid_seqno_index, 2680, InheritsRelidSeqnoIndexId, pg_inherits, btree(inhrelid oid_ops, inhseqno int4_ops)) | |
DECLARE_INDEX (pg_inherits_parent_index, 2187, InheritsParentIndexId, pg_inherits, btree(inhparent oid_ops)) | |
List * | find_inheritance_children (Oid parentrelId, LOCKMODE lockmode) |
List * | find_inheritance_children_extended (Oid parentrelId, bool omit_detached, LOCKMODE lockmode, bool *detached_exist, TransactionId *detached_xmin) |
List * | find_all_inheritors (Oid parentrelId, LOCKMODE lockmode, List **numparents) |
bool | has_subclass (Oid relationId) |
bool | has_superclass (Oid relationId) |
bool | typeInheritsFrom (Oid subclassTypeId, Oid superclassTypeId) |
void | StoreSingleInheritance (Oid relationId, Oid parentOid, int32 seqNumber) |
bool | DeleteInheritsTuple (Oid inhrelid, Oid inhparent, bool expect_detach_pending, const char *childname) |
bool | PartitionHasPendingDetach (Oid partoid) |
Variables | |
FormData_pg_inherits | |
typedef FormData_pg_inherits* Form_pg_inherits |
Definition at line 45 of file pg_inherits.h.
CATALOG | ( | pg_inherits | , |
2611 | , | ||
InheritsRelationId | |||
) |
DECLARE_INDEX | ( | pg_inherits_parent_index | , |
2187 | , | ||
InheritsParentIndexId | , | ||
pg_inherits | , | ||
btree(inhparent oid_ops) | |||
) |
DECLARE_UNIQUE_INDEX_PKEY | ( | pg_inherits_relid_seqno_index | , |
2680 | , | ||
InheritsRelidSeqnoIndexId | , | ||
pg_inherits | , | ||
btree(inhrelid oid_ops, inhseqno int4_ops) | |||
) |
bool DeleteInheritsTuple | ( | Oid | inhrelid, |
Oid | inhparent, | ||
bool | expect_detach_pending, | ||
const char * | childname | ||
) |
Definition at line 552 of file pg_inherits.c.
References BTEqualStrategyNumber, CatalogTupleDelete(), ereport, errcode(), errdetail(), errhint(), errmsg(), ERROR, GETSTRUCT, HeapTupleIsValid, sort-test::key, ObjectIdGetDatum(), OidIsValid, RowExclusiveLock, ScanKeyInit(), systable_beginscan(), systable_endscan(), systable_getnext(), HeapTupleData::t_self, table_close(), and table_open().
Referenced by index_concurrently_swap(), index_drop(), and RemoveInheritance().
Definition at line 255 of file pg_inherits.c.
References ctl, CurrentMemoryContext, find_inheritance_children(), HASH_BLOBS, HASH_CONTEXT, hash_create(), hash_destroy(), HASH_ELEM, HASH_ENTER, hash_search(), lappend_int(), lappend_oid(), lfirst_int, lfirst_oid, list_free(), SeenRelsEntry::list_index, list_length(), list_make1_int, list_make1_oid, and list_nth_cell().
Referenced by acquire_inherited_sample_rows(), apply_handle_truncate(), ATCheckPartitionsNotInUse(), ATExecAddInherit(), ATExecAttachPartition(), ATExecValidateConstraint(), ATPrepAlterColumnType(), ATSimpleRecursion(), check_default_partition_contents(), CloneFkReferencing(), CreateTriggerFiringOn(), DefineIndex(), DetachPartitionFinalize(), ExecuteTruncate(), expand_inherited_rtentry(), expand_vacuum_rel(), get_tables_to_cluster_partitioned(), GetPubPartitionOptionRelations(), LockTableRecurse(), OpenTableList(), pg_partition_tree(), ProcessUtilitySlow(), ReindexPartitions(), RemoveRelations(), rename_constraint_internal(), renameatt_internal(), renametrig(), and sepgsql_dml_privileges().
Definition at line 58 of file pg_inherits.c.
References find_inheritance_children_extended().
Referenced by ATAddCheckConstraint(), ATExecAddColumn(), ATExecAddIdentity(), ATExecDropColumn(), ATExecDropConstraint(), ATExecDropIdentity(), ATExecSetIdentity(), ATPrepAlterColumnType(), ATPrepDropExpression(), find_all_inheritors(), rename_constraint_internal(), and renameatt_internal().
List* find_inheritance_children_extended | ( | Oid | parentrelId, |
bool | omit_detached, | ||
LOCKMODE | lockmode, | ||
bool * | detached_exist, | ||
TransactionId * | detached_xmin | ||
) |
Definition at line 82 of file pg_inherits.c.
References AccessShareLock, ActiveSnapshotSet(), BTEqualStrategyNumber, elog, GetActiveSnapshot(), GETSTRUCT, has_subclass(), HeapTupleHeaderGetXmin, i, InvalidTransactionId, sort-test::key, lappend_oid(), sort-test::list, LockRelationOid(), NIL, NoLock, ObjectIdGetDatum(), oid_cmp(), palloc(), pfree(), qsort, repalloc(), ScanKeyInit(), SearchSysCacheExists1, systable_beginscan(), systable_endscan(), systable_getnext(), HeapTupleData::t_data, table_close(), table_open(), TransactionIdFollows(), UnlockRelationOid(), WARNING, and XidInMVCCSnapshot().
Referenced by find_inheritance_children(), and RelationBuildPartitionDesc().
Definition at line 355 of file pg_inherits.c.
References elog, ERROR, GETSTRUCT, HeapTupleIsValid, ObjectIdGetDatum(), ReleaseSysCache(), and SearchSysCache1().
Referenced by find_inheritance_children_extended(), subquery_planner(), and typeInheritsFrom().
Definition at line 377 of file pg_inherits.c.
References AccessShareLock, BTEqualStrategyNumber, HeapTupleIsValid, ObjectIdGetDatum(), ScanKeyInit(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), and table_open().
Referenced by CreateTriggerFiringOn(), DefineIndex(), and DetachPartitionFinalize().
Definition at line 620 of file pg_inherits.c.
References BTEqualStrategyNumber, elog, ERROR, GETSTRUCT, HeapTupleIsValid, sort-test::key, ObjectIdGetDatum(), RowExclusiveLock, ScanKeyInit(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), and table_open().
Referenced by ATPrepCmd().
Definition at line 508 of file pg_inherits.c.
References BoolGetDatum(), CatalogTupleInsert(), heap_form_tuple(), heap_freetuple(), Int32GetDatum(), ObjectIdGetDatum(), RelationGetDescr, RowExclusiveLock, table_close(), table_open(), and values.
Referenced by index_concurrently_swap(), index_create(), IndexSetParentIndex(), and StoreCatalogInheritance1().
Definition at line 406 of file pg_inherits.c.
References AccessShareLock, BTEqualStrategyNumber, GETSTRUCT, has_subclass(), InvalidOid, lappend_oid(), lfirst_oid, list_free(), list_make1_oid, list_member_oid(), NIL, ObjectIdGetDatum(), ScanKeyInit(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), table_open(), typeidTypeRelid(), and typeOrDomainTypeRelid().
Referenced by can_coerce_type(), and coerce_type().
FormData_pg_inherits |
Definition at line 38 of file pg_inherits.h.