PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
pg_attrdef.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * pg_attrdef.h
4  * definition of the system "attribute defaults" relation (pg_attrdef)
5  * along with the relation's initial contents.
6  *
7  *
8  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
9  * Portions Copyright (c) 1994, Regents of the University of California
10  *
11  * src/include/catalog/pg_attrdef.h
12  *
13  * NOTES
14  * the genbki.pl script reads this file and generates .bki
15  * information from the DATA() statements.
16  *
17  *-------------------------------------------------------------------------
18  */
19 #ifndef PG_ATTRDEF_H
20 #define PG_ATTRDEF_H
21 
22 #include "catalog/genbki.h"
23 
24 /* ----------------
25  * pg_attrdef definition. cpp turns this into
26  * typedef struct FormData_pg_attrdef
27  * ----------------
28  */
29 #define AttrDefaultRelationId 2604
30 
31 CATALOG(pg_attrdef,2604)
32 {
33  Oid adrelid; /* OID of table containing attribute */
34  int16 adnum; /* attnum of attribute */
35 
36 #ifdef CATALOG_VARLEN /* variable-length fields start here */
37  pg_node_tree adbin; /* nodeToString representation of default */
38  text adsrc; /* human-readable representation of default */
39 #endif
41 
42 /* ----------------
43  * Form_pg_attrdef corresponds to a pointer to a tuple with
44  * the format of pg_attrdef relation.
45  * ----------------
46  */
48 
49 /* ----------------
50  * compiler constants for pg_attrdef
51  * ----------------
52  */
53 #define Natts_pg_attrdef 4
54 #define Anum_pg_attrdef_adrelid 1
55 #define Anum_pg_attrdef_adnum 2
56 #define Anum_pg_attrdef_adbin 3
57 #define Anum_pg_attrdef_adsrc 4
58 
59 #endif /* PG_ATTRDEF_H */
signed short int16
Definition: c.h:245
CATALOG(pg_attrdef, 2604)
Definition: pg_attrdef.h:31
unsigned int Oid
Definition: postgres_ext.h:31
FormData_pg_attrdef * Form_pg_attrdef
Definition: pg_attrdef.h:47
FormData_pg_attrdef
Definition: pg_attrdef.h:40
Definition: c.h:433