1/*-------------------------------------------------------------------------
4 * definition of the "enum" system catalog (pg_enum)
7 * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * src/include/catalog/pg_enum.h
13 * The Catalog.pm module reads this file and derives schema
16 *-------------------------------------------------------------------------
22#include "catalog/pg_enum_d.h" /* IWYU pragma: export */
27 * pg_enum definition. cpp turns this into
28 * typedef struct FormData_pg_enum
34 Oid enumtypid
BKI_LOOKUP(pg_type);
/* OID of owning enum type */
35 float4 enumsortorder;
/* sort position of this enum value */
36 NameData enumlabel;
/* text representation of enum value */
40 * Form_pg_enum corresponds to a pointer to a tuple with
41 * the format of pg_enum relation.
47 DECLARE_UNIQUE_INDEX(pg_enum_typid_label_index, 3503, EnumTypIdLabelIndexId, pg_enum, btree(enumtypid oid_ops, enumlabel name_ops));
48 DECLARE_UNIQUE_INDEX(pg_enum_typid_sortorder_index, 3534, EnumTypIdSortOrderIndexId, pg_enum, btree(enumtypid oid_ops, enumsortorder float4_ops));
54 * prototypes for functions in pg_enum.c
59 const char *neighbor,
bool newValIsAfter,
62 const char *oldVal,
const char *newVal);
#define BKI_LOOKUP(catalog)
DECLARE_UNIQUE_INDEX(pg_enum_typid_label_index, 3503, EnumTypIdLabelIndexId, pg_enum, btree(enumtypid oid_ops, enumlabel name_ops))
void RestoreUncommittedEnums(void *space)
void RenameEnumLabel(Oid enumTypeOid, const char *oldVal, const char *newVal)
Size EstimateUncommittedEnumsSpace(void)
FormData_pg_enum * Form_pg_enum
bool EnumUncommitted(Oid enum_id)
MAKE_SYSCACHE(ENUMOID, pg_enum_oid_index, 8)
void EnumValuesDelete(Oid enumTypeOid)
void AddEnumLabel(Oid enumTypeOid, const char *newVal, const char *neighbor, bool newValIsAfter, bool skipIfExists)
void SerializeUncommittedEnums(void *space, Size size)
CATALOG(pg_enum, 3501, EnumRelationId)
DECLARE_UNIQUE_INDEX_PKEY(pg_enum_oid_index, 3502, EnumOidIndexId, pg_enum, btree(oid oid_ops))
void EnumValuesCreate(Oid enumTypeOid, List *vals)