PostgreSQL Source Code git master
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-2025, 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
36extern void BootstrapModeMain(int argc, char *argv[], bool check_only) pg_attribute_noreturn();
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,
55 Oid *typinput,
56 Oid *typoutput);
57
58union YYSTYPE;
59#ifndef YY_TYPEDEF_YY_SCANNER_T
60#define YY_TYPEDEF_YY_SCANNER_T
61typedef void *yyscan_t;
62#endif
63
64extern int boot_yyparse(yyscan_t yyscanner);
65extern int boot_yylex_init(yyscan_t *yyscannerp);
66extern int boot_yylex(union YYSTYPE *yylval_param, yyscan_t yyscanner);
67extern void boot_yyerror(yyscan_t yyscanner, const char *message) pg_attribute_noreturn();
68
69#endif /* BOOTSTRAP_H */
void closerel(char *relname)
Definition: bootstrap.c:485
void * yyscan_t
Definition: bootstrap.h:61
void BootstrapModeMain(int argc, char *argv[], bool check_only) pg_attribute_noreturn()
Definition: bootstrap.c:198
int boot_yylex_init(yyscan_t *yyscannerp)
#define MAXATTR
Definition: bootstrap.h:25
void build_indices(void)
Definition: bootstrap.c:982
void InsertOneValue(char *value, int i)
Definition: bootstrap.c:657
PGDLLIMPORT Relation boot_reldesc
Definition: bootstrap.c:58
void InsertOneNull(int i)
Definition: bootstrap.c:695
int boot_yylex(union YYSTYPE *yylval_param, yyscan_t yyscanner)
void InsertOneTuple(void)
Definition: bootstrap.c:629
PGDLLIMPORT int numattr
Definition: bootstrap.c:61
PGDLLIMPORT Form_pg_attribute attrtypes[MAXATTR]
Definition: bootstrap.c:60
void boot_get_type_io_data(Oid typid, int16 *typlen, bool *typbyval, char *typalign, char *typdelim, Oid *typioparam, Oid *typinput, Oid *typoutput)
Definition: bootstrap.c:837
int boot_yyparse(yyscan_t yyscanner)
void boot_yyerror(yyscan_t yyscanner, const char *message) pg_attribute_noreturn()
Definition: bootscanner.l:132
void DefineAttr(char *name, char *type, int attnum, int nullness)
Definition: bootstrap.c:522
void index_register(Oid heap, Oid ind, const IndexInfo *indexInfo)
Definition: bootstrap.c:932
void boot_openrel(char *relname)
Definition: bootstrap.c:440
#define PGDLLIMPORT
Definition: c.h:1277
#define pg_attribute_noreturn()
Definition: c.h:239
int16_t int16
Definition: c.h:483
void * yyscan_t
Definition: cubedata.h:67
static struct @162 value
int i
Definition: isn.c:72
int16 attnum
Definition: pg_attribute.h:74
FormData_pg_attribute * Form_pg_attribute
Definition: pg_attribute.h:200
NameData relname
Definition: pg_class.h:38
char typalign
Definition: pg_type.h:176
unsigned int Oid
Definition: postgres_ext.h:32
int YYSTYPE
Definition: psqlscanslash.l:39
const char * type
const char * name