PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
genbki.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * genbki.h
4  * Required include file for all POSTGRES catalog header files
5  *
6  * genbki.h defines CATALOG(), DATA(), BKI_BOOTSTRAP and related macros
7  * so that the catalog header files can be read by the C compiler.
8  * (These same words are recognized by genbki.pl to build the BKI
9  * bootstrap file from these header files.)
10  *
11  *
12  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
13  * Portions Copyright (c) 1994, Regents of the University of California
14  *
15  * src/include/catalog/genbki.h
16  *
17  *-------------------------------------------------------------------------
18  */
19 #ifndef GENBKI_H
20 #define GENBKI_H
21 
22 /* Introduces a catalog's structure definition */
23 #define CATALOG(name,oid) typedef struct CppConcat(FormData_,name)
24 
25 /* Options that may appear after CATALOG (on the same line) */
26 #define BKI_BOOTSTRAP
27 #define BKI_SHARED_RELATION
28 #define BKI_WITHOUT_OIDS
29 #define BKI_ROWTYPE_OID(oid)
30 #define BKI_SCHEMA_MACRO
31 #define BKI_FORCE_NULL
32 #define BKI_FORCE_NOT_NULL
33 
34 /*
35  * This is never defined; it's here only for documentation.
36  *
37  * Variable-length catalog fields (except possibly the first not nullable one)
38  * should not be visible in C structures, so they are made invisible by #ifdefs
39  * of an undefined symbol. See also MARKNOTNULL in bootstrap.c for how this is
40  * handled.
41  */
42 #undef CATALOG_VARLEN
43 
44 /* Declarations that provide the initial content of a catalog */
45 /* In C, these need to expand into some harmless, repeatable declaration */
46 #define DATA(x) extern int no_such_variable
47 #define DESCR(x) extern int no_such_variable
48 #define SHDESCR(x) extern int no_such_variable
49 
50 #endif /* GENBKI_H */