OSDN Git Service

eef42018eb4e57fc442936b7e69122eaf85bd37c
[pg-rex/syncrep.git] / src / include / bootstrap / bootstrap.h
1 /*-------------------------------------------------------------------------
2  *
3  * bootstrap.h
4  *        include file for the bootstrapping code
5  *
6  *
7  * Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * $PostgreSQL: pgsql/src/include/bootstrap/bootstrap.h,v 1.54 2010/01/02 16:58:01 momjian Exp $
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef BOOTSTRAP_H
15 #define BOOTSTRAP_H
16
17 #include "nodes/execnodes.h"
18
19 typedef enum
20 {
21         CheckerProcess,
22         BootstrapProcess,
23         StartupProcess,
24         BgWriterProcess,
25         WalWriterProcess,
26
27         NUM_AUXPROCTYPES                        /* Must be last! */
28 } AuxProcType;
29
30 /*
31  * MAXATTR is the maximum number of attributes in a relation supported
32  * at bootstrap time (i.e., the max possible in a system table).
33  */
34 #define MAXATTR 40
35
36 extern Relation boot_reldesc;
37 extern Form_pg_attribute attrtypes[MAXATTR];
38 extern int      numattr;
39
40
41 extern void AuxiliaryProcessMain(int argc, char *argv[]);
42
43 extern void err_out(void);
44
45 extern void closerel(char *name);
46 extern void boot_openrel(char *name);
47
48 extern void DefineAttr(char *name, char *type, int attnum);
49 extern void InsertOneTuple(Oid objectid);
50 extern void InsertOneValue(char *value, int i);
51 extern void InsertOneNull(int i);
52
53 extern char *MapArrayTypeName(char *s);
54
55 extern void index_register(Oid heap, Oid ind, IndexInfo *indexInfo);
56 extern void build_indices(void);
57
58 extern void boot_get_type_io_data(Oid typid,
59                                           int16 *typlen,
60                                           bool *typbyval,
61                                           char *typalign,
62                                           char *typdelim,
63                                           Oid *typioparam,
64                                           Oid *typinput,
65                                           Oid *typoutput);
66
67 extern int      boot_yyparse(void);
68
69 extern int      boot_yylex(void);
70 extern void boot_yyerror(const char *str);
71
72 #endif   /* BOOTSTRAP_H */