bootstrap.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*-------------------------------------------------------------------------
  2. *
  3. * bootstrap.h
  4. * include file for the bootstrapping code
  5. *
  6. *
  7. * Portions Copyright (c) 1996-2016, 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 Relation boot_reldesc;
  26. extern Form_pg_attribute attrtypes[MAXATTR];
  27. extern int numattr;
  28. extern void AuxiliaryProcessMain(int argc, char *argv[]) pg_attribute_noreturn();
  29. extern void err_out(void);
  30. extern void closerel(char *name);
  31. extern void boot_openrel(char *name);
  32. extern void DefineAttr(char *name, char *type, int attnum, int nullness);
  33. extern void InsertOneTuple(Oid objectid);
  34. extern void InsertOneValue(char *value, int i);
  35. extern void InsertOneNull(int i);
  36. extern char *MapArrayTypeName(const char *s);
  37. extern void index_register(Oid heap, Oid ind, IndexInfo *indexInfo);
  38. extern void build_indices(void);
  39. extern void boot_get_type_io_data(Oid typid,
  40. int16 *typlen,
  41. bool *typbyval,
  42. char *typalign,
  43. char *typdelim,
  44. Oid *typioparam,
  45. Oid *typinput,
  46. Oid *typoutput);
  47. extern int boot_yyparse(void);
  48. extern int boot_yylex(void);
  49. extern void boot_yyerror(const char *str) pg_attribute_noreturn();
  50. #endif /* BOOTSTRAP_H */