bootstrap.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*-------------------------------------------------------------------------
  2. *
  3. * bootstrap.h
  4. * include file for the bootstrapping code
  5. *
  6. *
  7. * Portions Copyright (c) 1996-2022, 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. #include "nodes/execnodes.h"
  17. /*
  18. * MAXATTR is the maximum number of attributes in a relation supported
  19. * at bootstrap time (i.e., the max possible in a system table).
  20. */
  21. #define MAXATTR 40
  22. #define BOOTCOL_NULL_AUTO 1
  23. #define BOOTCOL_NULL_FORCE_NULL 2
  24. #define BOOTCOL_NULL_FORCE_NOT_NULL 3
  25. extern PGDLLIMPORT Relation boot_reldesc;
  26. extern PGDLLIMPORT Form_pg_attribute attrtypes[MAXATTR];
  27. extern PGDLLIMPORT int numattr;
  28. extern void BootstrapModeMain(int argc, char *argv[], bool check_only) pg_attribute_noreturn();
  29. extern void closerel(char *name);
  30. extern void boot_openrel(char *name);
  31. extern void DefineAttr(char *name, char *type, int attnum, int nullness);
  32. extern void InsertOneTuple(void);
  33. extern void InsertOneValue(char *value, int i);
  34. extern void InsertOneNull(int i);
  35. extern void index_register(Oid heap, Oid ind, IndexInfo *indexInfo);
  36. extern void build_indices(void);
  37. extern void boot_get_type_io_data(Oid typid,
  38. int16 *typlen,
  39. bool *typbyval,
  40. char *typalign,
  41. char *typdelim,
  42. Oid *typioparam,
  43. Oid *typinput,
  44. Oid *typoutput);
  45. extern int boot_yyparse(void);
  46. extern int boot_yylex(void);
  47. extern void boot_yyerror(const char *str) pg_attribute_noreturn();
  48. #endif /* BOOTSTRAP_H */