Header And Logo

PostgreSQL
| The world's most advanced open source database.

pg_attrdef.h

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  * pg_attrdef.h
00004  *    definition of the system "attribute defaults" relation (pg_attrdef)
00005  *    along with the relation's initial contents.
00006  *
00007  *
00008  * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
00009  * Portions Copyright (c) 1994, Regents of the University of California
00010  *
00011  * src/include/catalog/pg_attrdef.h
00012  *
00013  * NOTES
00014  *    the genbki.pl script reads this file and generates .bki
00015  *    information from the DATA() statements.
00016  *
00017  *-------------------------------------------------------------------------
00018  */
00019 #ifndef PG_ATTRDEF_H
00020 #define PG_ATTRDEF_H
00021 
00022 #include "catalog/genbki.h"
00023 
00024 /* ----------------
00025  *      pg_attrdef definition.  cpp turns this into
00026  *      typedef struct FormData_pg_attrdef
00027  * ----------------
00028  */
00029 #define AttrDefaultRelationId  2604
00030 
00031 CATALOG(pg_attrdef,2604)
00032 {
00033     Oid         adrelid;        /* OID of table containing attribute */
00034     int16       adnum;          /* attnum of attribute */
00035 
00036 #ifdef CATALOG_VARLEN           /* variable-length fields start here */
00037     pg_node_tree adbin;         /* nodeToString representation of default */
00038     text        adsrc;          /* human-readable representation of default */
00039 #endif
00040 } FormData_pg_attrdef;
00041 
00042 /* ----------------
00043  *      Form_pg_attrdef corresponds to a pointer to a tuple with
00044  *      the format of pg_attrdef relation.
00045  * ----------------
00046  */
00047 typedef FormData_pg_attrdef *Form_pg_attrdef;
00048 
00049 /* ----------------
00050  *      compiler constants for pg_attrdef
00051  * ----------------
00052  */
00053 #define Natts_pg_attrdef                4
00054 #define Anum_pg_attrdef_adrelid         1
00055 #define Anum_pg_attrdef_adnum           2
00056 #define Anum_pg_attrdef_adbin           3
00057 #define Anum_pg_attrdef_adsrc           4
00058 
00059 #endif   /* PG_ATTRDEF_H */