pg_am.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*-------------------------------------------------------------------------
  2. *
  3. * pg_am.h
  4. * definition of the "access method" system catalog (pg_am)
  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/catalog/pg_am.h
  11. *
  12. * NOTES
  13. * The Catalog.pm module reads this file and derives schema
  14. * information.
  15. *
  16. *-------------------------------------------------------------------------
  17. */
  18. #ifndef PG_AM_H
  19. #define PG_AM_H
  20. #include "catalog/genbki.h"
  21. #include "catalog/pg_am_d.h"
  22. /* ----------------
  23. * pg_am definition. cpp turns this into
  24. * typedef struct FormData_pg_am
  25. * ----------------
  26. */
  27. CATALOG(pg_am,2601,AccessMethodRelationId)
  28. {
  29. Oid oid; /* oid */
  30. /* access method name */
  31. NameData amname;
  32. /* handler function */
  33. regproc amhandler BKI_LOOKUP(pg_proc);
  34. /* see AMTYPE_xxx constants below */
  35. char amtype;
  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. DECLARE_UNIQUE_INDEX(pg_am_name_index, 2651, AmNameIndexId, on pg_am using btree(amname name_ops));
  44. DECLARE_UNIQUE_INDEX_PKEY(pg_am_oid_index, 2652, AmOidIndexId, on pg_am using btree(oid oid_ops));
  45. #ifdef EXPOSE_TO_CLIENT_CODE
  46. /*
  47. * Allowed values for amtype
  48. */
  49. #define AMTYPE_INDEX 'i' /* index access method */
  50. #define AMTYPE_TABLE 't' /* table access method */
  51. #endif /* EXPOSE_TO_CLIENT_CODE */
  52. #endif /* PG_AM_H */