1996-07-09 02:22:35 -04:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
|
*
|
1999-02-13 18:22:53 -05:00
|
|
|
* bootstrap.h
|
1997-09-07 01:04:48 -04:00
|
|
|
* include file for the bootstrapping code
|
1996-07-09 02:22:35 -04:00
|
|
|
*
|
|
|
|
|
*
|
2003-08-03 22:40:20 -04:00
|
|
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
2000-01-26 00:58:53 -05:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
1996-07-09 02:22:35 -04:00
|
|
|
*
|
2004-07-21 16:34:50 -04:00
|
|
|
* $PostgreSQL: pgsql/src/include/bootstrap/bootstrap.h,v 1.37 2004/07/21 20:34:47 momjian Exp $
|
1996-07-09 02:22:35 -04:00
|
|
|
*
|
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
#ifndef BOOTSTRAP_H
|
|
|
|
|
#define BOOTSTRAP_H
|
|
|
|
|
|
1999-07-15 19:04:24 -04:00
|
|
|
#include "access/itup.h"
|
2000-07-14 18:18:02 -04:00
|
|
|
#include "nodes/execnodes.h"
|
1999-07-15 19:04:24 -04:00
|
|
|
#include "utils/rel.h"
|
1996-07-09 02:22:35 -04:00
|
|
|
|
2001-05-11 21:48:49 -04:00
|
|
|
/*
|
|
|
|
|
* MAXATTR is the maximum number of attributes in a relation supported
|
|
|
|
|
* at bootstrap time (i.e., the max possible in a system table).
|
2000-07-14 18:18:02 -04:00
|
|
|
*/
|
|
|
|
|
#define MAXATTR 40
|
1996-07-09 02:22:35 -04:00
|
|
|
|
1997-09-07 01:04:48 -04:00
|
|
|
typedef struct hashnode
|
|
|
|
|
{
|
1997-09-07 22:41:22 -04:00
|
|
|
int strnum; /* Index into string table */
|
1997-09-07 01:04:48 -04:00
|
|
|
struct hashnode *next;
|
1997-09-08 17:56:23 -04:00
|
|
|
} hashnode;
|
1996-07-09 02:22:35 -04:00
|
|
|
|
|
|
|
|
|
2002-04-27 17:24:34 -04:00
|
|
|
extern Relation boot_reldesc;
|
1998-08-31 23:29:17 -04:00
|
|
|
extern Form_pg_attribute attrtypes[MAXATTR];
|
1997-09-07 22:41:22 -04:00
|
|
|
extern int numattr;
|
2004-05-28 01:13:32 -04:00
|
|
|
extern int BootstrapMain(int argc, char *argv[]);
|
2000-06-17 19:41:51 -04:00
|
|
|
|
2002-03-26 14:17:02 -05:00
|
|
|
extern void index_register(Oid heap, Oid ind, IndexInfo *indexInfo);
|
1997-09-07 01:04:48 -04:00
|
|
|
|
1997-09-07 22:41:22 -04:00
|
|
|
extern void err_out(void);
|
|
|
|
|
extern void InsertOneTuple(Oid objectid);
|
|
|
|
|
extern void closerel(char *name);
|
|
|
|
|
extern void boot_openrel(char *name);
|
|
|
|
|
extern char *LexIDStr(int ident_num);
|
|
|
|
|
|
|
|
|
|
extern void DefineAttr(char *name, char *type, int attnum);
|
2001-08-10 14:57:42 -04:00
|
|
|
extern void InsertOneValue(char *value, int i);
|
1997-09-07 22:41:22 -04:00
|
|
|
extern void InsertOneNull(int i);
|
|
|
|
|
extern char *MapArrayTypeName(char *s);
|
|
|
|
|
extern char *CleanUpStr(char *s);
|
|
|
|
|
extern int EnterString(char *str);
|
|
|
|
|
extern void build_indices(void);
|
1997-09-07 01:04:48 -04:00
|
|
|
|
2000-01-20 00:34:32 -05:00
|
|
|
extern int Int_yylex(void);
|
|
|
|
|
extern void Int_yyerror(const char *str);
|
|
|
|
|
|
2000-11-09 06:26:00 -05:00
|
|
|
#define BS_XLOG_NOP 0
|
|
|
|
|
#define BS_XLOG_BOOTSTRAP 1
|
|
|
|
|
#define BS_XLOG_STARTUP 2
|
2004-05-29 18:48:23 -04:00
|
|
|
#define BS_XLOG_BGWRITER 3
|
2001-10-28 01:26:15 -05:00
|
|
|
|
2001-11-05 12:46:40 -05:00
|
|
|
#endif /* BOOTSTRAP_H */
|