PostgreSQL Source Code git master
|
Go to the source code of this file.
Typedefs | |
typedef FormData_pg_enum * | Form_pg_enum |
Functions | |
CATALOG (pg_enum, 3501, EnumRelationId) | |
DECLARE_UNIQUE_INDEX_PKEY (pg_enum_oid_index, 3502, EnumOidIndexId, pg_enum, btree(oid oid_ops)) | |
DECLARE_UNIQUE_INDEX (pg_enum_typid_label_index, 3503, EnumTypIdLabelIndexId, pg_enum, btree(enumtypid oid_ops, enumlabel name_ops)) | |
DECLARE_UNIQUE_INDEX (pg_enum_typid_sortorder_index, 3534, EnumTypIdSortOrderIndexId, pg_enum, btree(enumtypid oid_ops, enumsortorder float4_ops)) | |
MAKE_SYSCACHE (ENUMOID, pg_enum_oid_index, 8) | |
MAKE_SYSCACHE (ENUMTYPOIDNAME, pg_enum_typid_label_index, 8) | |
void | EnumValuesCreate (Oid enumTypeOid, List *vals) |
void | EnumValuesDelete (Oid enumTypeOid) |
void | AddEnumLabel (Oid enumTypeOid, const char *newVal, const char *neighbor, bool newValIsAfter, bool skipIfExists) |
void | RenameEnumLabel (Oid enumTypeOid, const char *oldVal, const char *newVal) |
bool | EnumUncommitted (Oid enum_id) |
Size | EstimateUncommittedEnumsSpace (void) |
void | SerializeUncommittedEnums (void *space, Size size) |
void | RestoreUncommittedEnums (void *space) |
void | AtEOXact_Enum (void) |
Variables | |
FormData_pg_enum | |
typedef FormData_pg_enum* Form_pg_enum |
void AddEnumLabel | ( | Oid | enumTypeOid, |
const char * | newVal, | ||
const char * | neighbor, | ||
bool | newValIsAfter, | ||
bool | skipIfExists | ||
) |
Definition at line 292 of file pg_enum.c.
References binary_upgrade_next_pg_enum_oid, CatalogTupleInsert(), CStringGetDatum(), EnumTypeUncommitted(), ereport, errcode(), ERRCODE_DUPLICATE_OBJECT, errdetail(), errmsg(), ERROR, ExclusiveLock, Float4GetDatum(), GetCurrentTransactionNestLevel(), GetNewOidWithIndex(), GETSTRUCT, HASH_ENTER, hash_search(), heap_form_tuple(), heap_freetuple(), HeapTupleIsValid, i, init_uncommitted_enum_values(), InvalidOid, IsBinaryUpgrade, sort-test::list, LockDatabaseObject(), NAMEDATALEN, NameGetDatum(), NameStr, namestrcpy(), NOTICE, ObjectIdGetDatum(), OidIsValid, palloc(), pfree(), qsort, RelationGetDescr, ReleaseCatCacheList(), ReleaseSysCache(), RenumberEnumType(), RowExclusiveLock, SearchSysCache2(), SearchSysCacheList1, sort_order_cmp(), table_close(), table_open(), uncommitted_enum_values, and values.
Referenced by AlterEnum().
void AtEOXact_Enum | ( | void | ) |
Definition at line 726 of file pg_enum.c.
References uncommitted_enum_types, and uncommitted_enum_values.
Referenced by AbortTransaction(), CommitTransaction(), and PrepareTransaction().
CATALOG | ( | pg_enum | , |
3501 | , | ||
EnumRelationId | |||
) |
DECLARE_UNIQUE_INDEX | ( | pg_enum_typid_label_index | , |
3503 | , | ||
EnumTypIdLabelIndexId | , | ||
pg_enum | , | ||
btree(enumtypid oid_ops, enumlabel name_ops) | |||
) |
DECLARE_UNIQUE_INDEX | ( | pg_enum_typid_sortorder_index | , |
3534 | , | ||
EnumTypIdSortOrderIndexId | , | ||
pg_enum | , | ||
btree(enumtypid oid_ops, enumsortorder float4_ops) | |||
) |
DECLARE_UNIQUE_INDEX_PKEY | ( | pg_enum_oid_index | , |
3502 | , | ||
EnumOidIndexId | , | ||
pg_enum | , | ||
btree(oid oid_ops) | |||
) |
bool EnumUncommitted | ( | Oid | enum_id | ) |
Definition at line 708 of file pg_enum.c.
References HASH_FIND, hash_search(), and uncommitted_enum_values.
Referenced by check_safe_enum_use().
Definition at line 84 of file pg_enum.c.
References CatalogCloseIndexes(), CatalogOpenIndexes(), CatalogTuplesMultiInsertWithInfo(), ereport, errcode(), errdetail(), errmsg(), ERROR, ExecClearTuple(), ExecDropSingleTupleTableSlot(), ExecStoreVirtualTuple(), Float4GetDatum(), FormData_pg_enum, GetCurrentTransactionNestLevel(), GetNewOidWithIndex(), HASH_ENTER, hash_search(), i, init_uncommitted_enum_types(), lfirst, list_length(), MakeSingleTupleTableSlot(), MAX_CATALOG_MULTI_INSERT_BYTES, Min, NAMEDATALEN, NameGetDatum(), namestrcpy(), ObjectIdGetDatum(), oid_cmp(), palloc(), palloc0(), pfree(), qsort, RelationGetDescr, RowExclusiveLock, strVal, table_close(), table_open(), TupleTableSlot::tts_values, TTSOpsHeapTuple, and uncommitted_enum_types.
Referenced by DefineEnum().
void EnumValuesDelete | ( | Oid | enumTypeOid | ) |
Definition at line 224 of file pg_enum.c.
References BTEqualStrategyNumber, CatalogTupleDelete(), HeapTupleIsValid, sort-test::key, ObjectIdGetDatum(), RowExclusiveLock, ScanKeyInit(), systable_beginscan(), systable_endscan(), systable_getnext(), HeapTupleData::t_self, table_close(), and table_open().
Referenced by RemoveTypeById().
Size EstimateUncommittedEnumsSpace | ( | void | ) |
Definition at line 813 of file pg_enum.c.
References hash_get_num_entries(), uncommitted_enum_types, and uncommitted_enum_values.
Referenced by InitializeParallelDSM(), and SerializeUncommittedEnums().
MAKE_SYSCACHE | ( | ENUMOID | , |
pg_enum_oid_index | , | ||
8 | |||
) |
MAKE_SYSCACHE | ( | ENUMTYPOIDNAME | , |
pg_enum_typid_label_index | , | ||
8 | |||
) |
void RenameEnumLabel | ( | Oid | enumTypeOid, |
const char * | oldVal, | ||
const char * | newVal | ||
) |
Definition at line 607 of file pg_enum.c.
References CatalogTupleUpdate(), ereport, errcode(), ERRCODE_DUPLICATE_OBJECT, errdetail(), errmsg(), ERROR, ExclusiveLock, GETSTRUCT, heap_copytuple(), heap_freetuple(), i, sort-test::list, LockDatabaseObject(), NAMEDATALEN, NameStr, namestrcpy(), ObjectIdGetDatum(), ReleaseCatCacheList(), RowExclusiveLock, SearchSysCacheList1, HeapTupleData::t_self, table_close(), and table_open().
Referenced by AlterEnum().
void RestoreUncommittedEnums | ( | void * | space | ) |
Definition at line 873 of file pg_enum.c.
References Assert, HASH_ENTER, hash_search(), init_uncommitted_enum_types(), init_uncommitted_enum_values(), OidIsValid, uncommitted_enum_types, and uncommitted_enum_values.
Referenced by ParallelWorkerMain().
void SerializeUncommittedEnums | ( | void * | space, |
Size | size | ||
) |
Definition at line 827 of file pg_enum.c.
References Assert, EstimateUncommittedEnumsSpace(), hash_seq_init(), hash_seq_search(), InvalidOid, size, uncommitted_enum_types, uncommitted_enum_values, and value.
Referenced by InitializeParallelDSM().
FormData_pg_enum |
Definition at line 37 of file pg_enum.h.
Referenced by EnumValuesCreate().