PostgreSQL Source Code
git master
Main Page
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
pg_enum.h
Go to the documentation of this file.
1
/*-------------------------------------------------------------------------
2
*
3
* pg_enum.h
4
* definition of the system "enum" relation (pg_enum)
5
* along with the relation's initial contents.
6
*
7
*
8
* Copyright (c) 2006-2016, PostgreSQL Global Development Group
9
*
10
* src/include/catalog/pg_enum.h
11
*
12
* NOTES
13
* the genbki.pl script reads this file and generates .bki
14
* information from the DATA() statements.
15
*
16
* XXX do NOT break up DATA() statements into multiple lines!
17
* the scripts are not as smart as you might think...
18
*
19
*-------------------------------------------------------------------------
20
*/
21
#ifndef PG_ENUM_H
22
#define PG_ENUM_H
23
24
#include "
catalog/genbki.h
"
25
#include "
nodes/pg_list.h
"
26
27
/* ----------------
28
* pg_enum definition. cpp turns this into
29
* typedef struct FormData_pg_enum
30
* ----------------
31
*/
32
#define EnumRelationId 3501
33
34
CATALOG
(pg_enum,3501)
35
{
36
Oid
enumtypid;
/* OID of owning enum type */
37
float4
enumsortorder;
/* sort position of this enum value */
38
NameData
enumlabel;
/* text representation of enum value */
39
}
FormData_pg_enum
;
40
41
/* ----------------
42
* Form_pg_enum corresponds to a pointer to a tuple with
43
* the format of pg_enum relation.
44
* ----------------
45
*/
46
typedef
FormData_pg_enum
*
Form_pg_enum
;
47
48
/* ----------------
49
* compiler constants for pg_enum
50
* ----------------
51
*/
52
#define Natts_pg_enum 3
53
#define Anum_pg_enum_enumtypid 1
54
#define Anum_pg_enum_enumsortorder 2
55
#define Anum_pg_enum_enumlabel 3
56
57
/* ----------------
58
* pg_enum has no initial contents
59
* ----------------
60
*/
61
62
/*
63
* prototypes for functions in pg_enum.c
64
*/
65
extern
void
EnumValuesCreate
(
Oid
enumTypeOid,
List
*vals);
66
extern
void
EnumValuesDelete
(
Oid
enumTypeOid);
67
extern
void
AddEnumLabel
(
Oid
enumTypeOid,
const
char
*newVal,
68
const
char
*neighbor,
bool
newValIsAfter,
69
bool
skipIfExists);
70
71
#endif
/* PG_ENUM_H */
CATALOG
CATALOG(pg_enum, 3501)
Definition:
pg_enum.h:34
EnumValuesCreate
void EnumValuesCreate(Oid enumTypeOid, List *vals)
Definition:
pg_enum.c:49
Oid
unsigned int Oid
Definition:
postgres_ext.h:31
AddEnumLabel
void AddEnumLabel(Oid enumTypeOid, const char *newVal, const char *neighbor, bool newValIsAfter, bool skipIfExists)
Definition:
pg_enum.c:180
genbki.h
EnumValuesDelete
void EnumValuesDelete(Oid enumTypeOid)
Definition:
pg_enum.c:145
nameData
Definition:
c.h:488
Form_pg_enum
FormData_pg_enum * Form_pg_enum
Definition:
pg_enum.h:46
FormData_pg_enum
FormData_pg_enum
Definition:
pg_enum.h:39
float4
float float4
Definition:
c.h:376
pg_list.h
List
Definition:
pg_list.h:45
src
include
catalog
pg_enum.h
Generated on Sat Jun 4 2016 05:15:22 for PostgreSQL Source Code by
1.8.8