| 1 | /*------------------------------------------------------------------------- |
| 2 | * |
| 3 | * bootstrap.h |
| 4 | * include file for the bootstrapping code |
| 5 | * |
| 6 | * |
| 7 | * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group |
| 8 | * Portions Copyright (c) 1994, Regents of the University of California |
| 9 | * |
| 10 | * src/include/bootstrap/bootstrap.h |
| 11 | * |
| 12 | *------------------------------------------------------------------------- |
| 13 | */ |
| 14 | #ifndef BOOTSTRAP_H |
| 15 | #define BOOTSTRAP_H |
| 16 | |
| 17 | #include "nodes/execnodes.h" |
| 18 | |
| 19 | |
| 20 | /* |
| 21 | * MAXATTR is the maximum number of attributes in a relation supported |
| 22 | * at bootstrap time (i.e., the max possible in a system table). |
| 23 | */ |
| 24 | #define MAXATTR 40 |
| 25 | |
| 26 | #define BOOTCOL_NULL_AUTO 1 |
| 27 | #define BOOTCOL_NULL_FORCE_NULL 2 |
| 28 | #define BOOTCOL_NULL_FORCE_NOT_NULL 3 |
| 29 | |
| 30 | extern Relation boot_reldesc; |
| 31 | extern Form_pg_attribute attrtypes[MAXATTR]; |
| 32 | extern int numattr; |
| 33 | |
| 34 | |
| 35 | extern void AuxiliaryProcessMain(int argc, char *argv[]) pg_attribute_noreturn(); |
| 36 | |
| 37 | extern void err_out(void); |
| 38 | |
| 39 | extern void closerel(char *name); |
| 40 | extern void boot_openrel(char *name); |
| 41 | |
| 42 | extern void DefineAttr(char *name, char *type, int attnum, int nullness); |
| 43 | extern void InsertOneTuple(void); |
| 44 | extern void InsertOneValue(char *value, int i); |
| 45 | extern void InsertOneNull(int i); |
| 46 | |
| 47 | extern void index_register(Oid heap, Oid ind, IndexInfo *indexInfo); |
| 48 | extern void build_indices(void); |
| 49 | |
| 50 | extern void boot_get_type_io_data(Oid typid, |
| 51 | int16 *typlen, |
| 52 | bool *typbyval, |
| 53 | char *typalign, |
| 54 | char *typdelim, |
| 55 | Oid *typioparam, |
| 56 | Oid *typinput, |
| 57 | Oid *typoutput); |
| 58 | |
| 59 | extern int boot_yyparse(void); |
| 60 | |
| 61 | extern int boot_yylex(void); |
| 62 | extern void boot_yyerror(const char *str) pg_attribute_noreturn(); |
| 63 | |
| 64 | #endif /* BOOTSTRAP_H */ |
| 65 | |