]> granicus.if.org Git - postgresql/blob - src/include/bootstrap/bootstrap.h
Change the declaration of struct varlena so that the length word is
[postgresql] / src / include / bootstrap / bootstrap.h
1 /*-------------------------------------------------------------------------
2  *
3  * bootstrap.h
4  *        include file for the bootstrapping code
5  *
6  *
7  * Portions Copyright (c) 1996-2008, 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.50 2008/01/01 19:45:56 momjian Exp $
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef BOOTSTRAP_H
15 #define BOOTSTRAP_H
16
17 #include "nodes/execnodes.h"
18
19 /*
20  * MAXATTR is the maximum number of attributes in a relation supported
21  * at bootstrap time (i.e., the max possible in a system table).
22  */
23 #define MAXATTR 40
24
25 typedef struct hashnode
26 {
27         int                     strnum;                 /* Index into string table */
28         struct hashnode *next;
29 } hashnode;
30
31
32 extern Relation boot_reldesc;
33 extern Form_pg_attribute attrtypes[MAXATTR];
34 extern int      numattr;
35 extern void AuxiliaryProcessMain(int argc, char *argv[]);
36
37 extern void index_register(Oid heap, Oid ind, IndexInfo *indexInfo);
38
39 extern void err_out(void);
40 extern void InsertOneTuple(Oid objectid);
41 extern void closerel(char *name);
42 extern void boot_openrel(char *name);
43 extern char *LexIDStr(int ident_num);
44
45 extern void DefineAttr(char *name, char *type, int attnum);
46 extern void InsertOneValue(char *value, int i);
47 extern void InsertOneNull(int i);
48 extern char *MapArrayTypeName(char *s);
49 extern char *CleanUpStr(char *s);
50 extern int      EnterString(char *str);
51 extern void build_indices(void);
52
53 extern void boot_get_type_io_data(Oid typid,
54                                           int16 *typlen,
55                                           bool *typbyval,
56                                           char *typalign,
57                                           char *typdelim,
58                                           Oid *typioparam,
59                                           Oid *typinput,
60                                           Oid *typoutput);
61
62 extern int      boot_yyparse(void);
63
64 extern int      boot_yylex(void);
65 extern void boot_yyerror(const char *str);
66
67 typedef enum
68 {
69         CheckerProcess,
70         BootstrapProcess,
71         StartupProcess,
72         BgWriterProcess,
73         WalWriterProcess
74 } AuxProcType;
75
76 #endif   /* BOOTSTRAP_H */