1 /*-------------------------------------------------------------------------
4 * definition of the "enum" system catalog (pg_enum)
7 * Portions Copyright (c) 1996-2019, 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 *-------------------------------------------------------------------------
21 #include "catalog/genbki.h"
22 #include "catalog/pg_enum_d.h"
24 #include "nodes/pg_list.h"
27 * pg_enum definition. cpp turns this into
28 * typedef struct FormData_pg_enum
31 CATALOG(pg_enum,3501,EnumRelationId)
34 Oid enumtypid; /* 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.
44 typedef FormData_pg_enum *Form_pg_enum;
47 * prototypes for functions in pg_enum.c
49 extern void EnumValuesCreate(Oid enumTypeOid, List *vals);
50 extern void EnumValuesDelete(Oid enumTypeOid);
51 extern void AddEnumLabel(Oid enumTypeOid, const char *newVal,
52 const char *neighbor, bool newValIsAfter,
54 extern void RenameEnumLabel(Oid enumTypeOid,
55 const char *oldVal, const char *newVal);
56 extern bool EnumBlacklisted(Oid enum_id);
57 extern Size EstimateEnumBlacklistSpace(void);
58 extern void SerializeEnumBlacklist(void *space, Size size);
59 extern void RestoreEnumBlacklist(void *space);
60 extern void AtEOXact_Enum(void);
62 #endif /* PG_ENUM_H */