PostgreSQL Source Code  git master
bootstrap.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * bootstrap.h
4  * include file for the bootstrapping code
5  *
6  *
7  * Portions Copyright (c) 1996-2024, 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 #include "nodes/parsenodes.h"
19 
20 
21 /*
22  * MAXATTR is the maximum number of attributes in a relation supported
23  * at bootstrap time (i.e., the max possible in a system table).
24  */
25 #define MAXATTR 40
26 
27 #define BOOTCOL_NULL_AUTO 1
28 #define BOOTCOL_NULL_FORCE_NULL 2
29 #define BOOTCOL_NULL_FORCE_NOT_NULL 3
30 
33 extern PGDLLIMPORT int numattr;
34 
35 
36 extern void BootstrapModeMain(int argc, char *argv[], bool check_only) pg_attribute_noreturn();
37 
38 extern void closerel(char *relname);
39 extern void boot_openrel(char *relname);
40 
41 extern void DefineAttr(char *name, char *type, int attnum, int nullness);
42 extern void InsertOneTuple(void);
43 extern void InsertOneValue(char *value, int i);
44 extern void InsertOneNull(int i);
45 
46 extern void index_register(Oid heap, Oid ind, const IndexInfo *indexInfo);
47 extern void build_indices(void);
48 
49 extern void boot_get_type_io_data(Oid typid,
50  int16 *typlen,
51  bool *typbyval,
52  char *typalign,
53  char *typdelim,
54  Oid *typioparam,
55  Oid *typinput,
56  Oid *typoutput);
57 
58 extern int boot_yyparse(void);
59 
60 extern int boot_yylex(void);
61 extern void boot_yyerror(const char *message) pg_attribute_noreturn();
62 
63 #endif /* BOOTSTRAP_H */
void closerel(char *relname)
Definition: bootstrap.c:453
void boot_yyerror(const char *message) pg_attribute_noreturn()
void BootstrapModeMain(int argc, char *argv[], bool check_only) pg_attribute_noreturn()
Definition: bootstrap.c:199
#define MAXATTR
Definition: bootstrap.h:25
void build_indices(void)
Definition: bootstrap.c:951
void InsertOneValue(char *value, int i)
Definition: bootstrap.c:626
PGDLLIMPORT Relation boot_reldesc
Definition: bootstrap.c:59
int boot_yyparse(void)
void InsertOneNull(int i)
Definition: bootstrap.c:664
int boot_yylex(void)
void InsertOneTuple(void)
Definition: bootstrap.c:598
PGDLLIMPORT int numattr
Definition: bootstrap.c:62
PGDLLIMPORT Form_pg_attribute attrtypes[MAXATTR]
Definition: bootstrap.c:61
void boot_get_type_io_data(Oid typid, int16 *typlen, bool *typbyval, char *typalign, char *typdelim, Oid *typioparam, Oid *typinput, Oid *typoutput)
Definition: bootstrap.c:806
void DefineAttr(char *name, char *type, int attnum, int nullness)
Definition: bootstrap.c:490
void index_register(Oid heap, Oid ind, const IndexInfo *indexInfo)
Definition: bootstrap.c:901
void boot_openrel(char *relname)
Definition: bootstrap.c:408
#define PGDLLIMPORT
Definition: c.h:1316
signed short int16
Definition: c.h:493
#define pg_attribute_noreturn()
Definition: c.h:217
static struct @155 value
int i
Definition: isn.c:73
int16 attnum
Definition: pg_attribute.h:74
FormData_pg_attribute * Form_pg_attribute
Definition: pg_attribute.h:209
NameData relname
Definition: pg_class.h:38
char typalign
Definition: pg_type.h:176
unsigned int Oid
Definition: postgres_ext.h:31
const char * type
const char * name