]> granicus.if.org Git - postgresql/blob - src/include/bootstrap/bootstrap.h
Add code to allow profiling of backends on Linux: save and restore the
[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-2001, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * $Id: bootstrap.h,v 1.26 2001/11/05 17:46:31 momjian Exp $
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef BOOTSTRAP_H
15 #define BOOTSTRAP_H
16
17 #include "access/itup.h"
18 #include "nodes/execnodes.h"
19 #include "utils/rel.h"
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 typedef struct hashnode
28 {
29         int                     strnum;                 /* Index into string table */
30         struct hashnode *next;
31 } hashnode;
32
33
34 extern Relation reldesc;
35 extern Form_pg_attribute attrtypes[MAXATTR];
36 extern int      numattr;
37 extern int      DebugMode;
38
39 extern int      BootstrapMain(int ac, char *av[]);
40
41 extern void index_register(char *heap, char *ind, IndexInfo *indexInfo);
42
43 extern void err_out(void);
44 extern void InsertOneTuple(Oid objectid);
45 extern void closerel(char *name);
46 extern void boot_openrel(char *name);
47 extern char *LexIDStr(int ident_num);
48
49 extern void DefineAttr(char *name, char *type, int attnum);
50 extern void InsertOneValue(char *value, int i);
51 extern void InsertOneNull(int i);
52 extern char *MapArrayTypeName(char *s);
53 extern char *CleanUpStr(char *s);
54 extern int      EnterString(char *str);
55 extern void build_indices(void);
56
57 extern int      Int_yylex(void);
58 extern void Int_yyerror(const char *str);
59
60 #define BS_XLOG_NOP                     0
61 #define BS_XLOG_BOOTSTRAP       1
62 #define BS_XLOG_STARTUP         2
63 #define BS_XLOG_CHECKPOINT      3
64 #define BS_XLOG_SHUTDOWN        4
65
66 #endif   /* BOOTSTRAP_H */