pg_am.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /*-------------------------------------------------------------------------
  2. *
  3. * pg_am.h
  4. * definition of the system "access method" relation (pg_am)
  5. * along with the relation's initial contents.
  6. *
  7. *
  8. * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
  9. * Portions Copyright (c) 1994, Regents of the University of California
  10. *
  11. * src/include/catalog/pg_am.h
  12. *
  13. * NOTES
  14. * the genbki.pl script reads this file and generates .bki
  15. * information from the DATA() statements.
  16. *
  17. * XXX do NOT break up DATA() statements into multiple lines!
  18. * the scripts are not as smart as you might think...
  19. *
  20. *-------------------------------------------------------------------------
  21. */
  22. #ifndef PG_AM_H
  23. #define PG_AM_H
  24. #include "catalog/genbki.h"
  25. /* ----------------
  26. * pg_am definition. cpp turns this into
  27. * typedef struct FormData_pg_am
  28. * ----------------
  29. */
  30. #define AccessMethodRelationId 2601
  31. CATALOG(pg_am,2601)
  32. {
  33. NameData amname; /* access method name */
  34. regproc amhandler; /* handler function */
  35. char amtype; /* see AMTYPE_xxx constants below */
  36. } FormData_pg_am;
  37. /* ----------------
  38. * Form_pg_am corresponds to a pointer to a tuple with
  39. * the format of pg_am relation.
  40. * ----------------
  41. */
  42. typedef FormData_pg_am *Form_pg_am;
  43. /* ----------------
  44. * compiler constants for pg_am
  45. * ----------------
  46. */
  47. #define Natts_pg_am 3
  48. #define Anum_pg_am_amname 1
  49. #define Anum_pg_am_amhandler 2
  50. #define Anum_pg_am_amtype 3
  51. /* ----------------
  52. * compiler constant for amtype
  53. * ----------------
  54. */
  55. #define AMTYPE_INDEX 'i' /* index access method */
  56. /* ----------------
  57. * initial contents of pg_am
  58. * ----------------
  59. */
  60. DATA(insert OID = 403 ( btree bthandler i ));
  61. DESCR("b-tree index access method");
  62. #define BTREE_AM_OID 403
  63. DATA(insert OID = 405 ( hash hashhandler i ));
  64. DESCR("hash index access method");
  65. #define HASH_AM_OID 405
  66. DATA(insert OID = 783 ( gist gisthandler i ));
  67. DESCR("GiST index access method");
  68. #define GIST_AM_OID 783
  69. DATA(insert OID = 2742 ( gin ginhandler i ));
  70. DESCR("GIN index access method");
  71. #define GIN_AM_OID 2742
  72. DATA(insert OID = 4000 ( spgist spghandler i ));
  73. DESCR("SP-GiST index access method");
  74. #define SPGIST_AM_OID 4000
  75. DATA(insert OID = 3580 ( brin brinhandler i ));
  76. DESCR("block range index (BRIN) access method");
  77. #define BRIN_AM_OID 3580
  78. #endif /* PG_AM_H */