1996-07-09 08:22:35 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
1999-02-14 00:22:53 +01:00
|
|
|
* bootstrap.h
|
1997-09-07 07:04:48 +02:00
|
|
|
* include file for the bootstrapping code
|
1996-07-09 08:22:35 +02:00
|
|
|
*
|
|
|
|
*
|
2003-08-04 04:40:20 +02:00
|
|
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
2000-01-26 06:58:53 +01:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
1996-07-09 08:22:35 +02:00
|
|
|
*
|
2004-05-28 07:13:32 +02:00
|
|
|
* $PostgreSQL: pgsql/src/include/bootstrap/bootstrap.h,v 1.34 2004/05/28 05:13:21 tgl Exp $
|
1996-07-09 08:22:35 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
#ifndef BOOTSTRAP_H
|
|
|
|
#define BOOTSTRAP_H
|
|
|
|
|
1999-07-16 01:04:24 +02:00
|
|
|
#include "access/itup.h"
|
2000-07-15 00:18:02 +02:00
|
|
|
#include "nodes/execnodes.h"
|
1999-07-16 01:04:24 +02:00
|
|
|
#include "utils/rel.h"
|
1996-07-09 08:22:35 +02:00
|
|
|
|
2001-05-12 03:48:49 +02: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-15 00:18:02 +02:00
|
|
|
*/
|
|
|
|
#define MAXATTR 40
|
1996-07-09 08:22:35 +02:00
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
typedef struct hashnode
|
|
|
|
{
|
1997-09-08 04:41:22 +02:00
|
|
|
int strnum; /* Index into string table */
|
1997-09-07 07:04:48 +02:00
|
|
|
struct hashnode *next;
|
1997-09-08 23:56:23 +02:00
|
|
|
} hashnode;
|
1996-07-09 08:22:35 +02:00
|
|
|
|
|
|
|
|
2002-04-27 23:24:34 +02:00
|
|
|
extern Relation boot_reldesc;
|
1998-09-01 05:29:17 +02:00
|
|
|
extern Form_pg_attribute attrtypes[MAXATTR];
|
1997-09-08 04:41:22 +02:00
|
|
|
extern int numattr;
|
2004-05-28 07:13:32 +02:00
|
|
|
extern int BootstrapMain(int argc, char *argv[]);
|
2000-06-18 01:41:51 +02:00
|
|
|
|
2002-03-26 20:17:02 +01:00
|
|
|
extern void index_register(Oid heap, Oid ind, IndexInfo *indexInfo);
|
1997-09-07 07:04:48 +02:00
|
|
|
|
1997-09-08 04:41:22 +02: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 20:57:42 +02:00
|
|
|
extern void InsertOneValue(char *value, int i);
|
1997-09-08 04:41:22 +02: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 07:04:48 +02:00
|
|
|
|
2000-01-20 06:34:32 +01:00
|
|
|
extern int Int_yylex(void);
|
|
|
|
extern void Int_yyerror(const char *str);
|
|
|
|
|
2000-11-09 12:26:00 +01:00
|
|
|
#define BS_XLOG_NOP 0
|
|
|
|
#define BS_XLOG_BOOTSTRAP 1
|
|
|
|
#define BS_XLOG_STARTUP 2
|
|
|
|
#define BS_XLOG_CHECKPOINT 3
|
2003-11-19 16:55:08 +01:00
|
|
|
#define BS_XLOG_BGWRITER 4
|
|
|
|
#define BS_XLOG_SHUTDOWN 5
|
2001-10-28 07:26:15 +01:00
|
|
|
|
2001-11-05 18:46:40 +01:00
|
|
|
#endif /* BOOTSTRAP_H */
|