PostgreSQL Source Code git master
Loading...
Searching...
No Matches
bootstrap.h
Go to the documentation of this file.
1/*-------------------------------------------------------------------------
2 *
3 * bootstrap.h
4 * include file for the bootstrapping code
5 *
6 *
7 * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
9 *
10 * src/include/bootstrap/bootstrap.h
11 *
12 *-------------------------------------------------------------------------
13 */
14#ifndef BOOTSTRAP_H
15#define BOOTSTRAP_H
16
17#include "nodes/execnodes.h"
18#include "nodes/parsenodes.h"
19
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#define BOOTCOL_NULL_AUTO 1
28#define BOOTCOL_NULL_FORCE_NULL 2
29#define BOOTCOL_NULL_FORCE_NOT_NULL 3
30
33extern PGDLLIMPORT int numattr;
34
35
36pg_noreturn extern void BootstrapModeMain(int argc, char *argv[], bool check_only);
37
38extern void closerel(char *relname);
39extern void boot_openrel(char *relname);
40
41extern void DefineAttr(char *name, char *type, int attnum, int nullness);
42extern void InsertOneTuple(void);
43extern void InsertOneValue(char *value, int i);
44extern void InsertOneNull(int i);
45
46extern void index_register(Oid heap, Oid ind, const IndexInfo *indexInfo);
47extern void build_indices(void);
48
49extern void boot_get_type_io_data(Oid typid,
50 int16 *typlen,
51 bool *typbyval,
52 char *typalign,
53 char *typdelim,
54 Oid *typioparam,
56 Oid *typoutput,
57 Oid *typcollation);
58
59union YYSTYPE;
60typedef void *yyscan_t;
61
62extern int boot_yyparse(yyscan_t yyscanner);
64extern int boot_yylex(union YYSTYPE *yylval_param, yyscan_t yyscanner);
65pg_noreturn extern void boot_yyerror(yyscan_t yyscanner, const char *message);
66
67#endif /* BOOTSTRAP_H */
void closerel(char *relname)
Definition bootstrap.c:481
void * yyscan_t
Definition bootstrap.h:60
int boot_yylex_init(yyscan_t *yyscannerp)
#define MAXATTR
Definition bootstrap.h:25
void build_indices(void)
Definition bootstrap.c:1113
void InsertOneValue(char *value, int i)
Definition bootstrap.c:653
PGDLLIMPORT Relation boot_reldesc
Definition bootstrap.c:60
pg_noreturn void boot_yyerror(yyscan_t yyscanner, const char *message)
void InsertOneNull(int i)
Definition bootstrap.c:820
pg_noreturn void BootstrapModeMain(int argc, char *argv[], bool check_only)
Definition bootstrap.c:194
int boot_yylex(union YYSTYPE *yylval_param, yyscan_t yyscanner)
void InsertOneTuple(void)
Definition bootstrap.c:625
void boot_get_type_io_data(Oid typid, int16 *typlen, bool *typbyval, char *typalign, char *typdelim, Oid *typioparam, Oid *typinput, Oid *typoutput, Oid *typcollation)
Definition bootstrap.c:963
PGDLLIMPORT int numattr
Definition bootstrap.c:63
PGDLLIMPORT Form_pg_attribute attrtypes[MAXATTR]
Definition bootstrap.c:62
int boot_yyparse(yyscan_t yyscanner)
void DefineAttr(char *name, char *type, int attnum, int nullness)
Definition bootstrap.c:518
void index_register(Oid heap, Oid ind, const IndexInfo *indexInfo)
Definition bootstrap.c:1063
void boot_openrel(char *relname)
Definition bootstrap.c:436
#define PGDLLIMPORT
Definition c.h:1356
#define pg_noreturn
Definition c.h:176
int16_t int16
Definition c.h:553
void * yyscan_t
Definition cubedata.h:65
static struct @174 value
int i
Definition isn.c:77
int16 attnum
FormData_pg_attribute * Form_pg_attribute
NameData relname
Definition pg_class.h:40
char typalign
Definition pg_type.h:178
unsigned int Oid
static int fb(int x)
int YYSTYPE
const char * type
const char * name