pg_shdescription.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*-------------------------------------------------------------------------
  2. *
  3. * pg_shdescription.h
  4. * definition of the "shared description" system catalog
  5. * (pg_shdescription)
  6. *
  7. * Because the contents of this table are taken from the *.dat files
  8. * of other catalogs, there is no pg_shdescription.dat file. The initial
  9. * contents are assembled by genbki.pl and loaded during initdb.
  10. *
  11. * NOTE: an object is identified by the OID of the row that primarily
  12. * defines the object, plus the OID of the table that that row appears in.
  13. * For example, a database is identified by the OID of its pg_database row
  14. * plus the pg_class OID of table pg_database. This allows unique
  15. * identification of objects without assuming that OIDs are unique
  16. * across tables.
  17. *
  18. *
  19. * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
  20. * Portions Copyright (c) 1994, Regents of the University of California
  21. *
  22. * src/include/catalog/pg_shdescription.h
  23. *
  24. * NOTES
  25. * The Catalog.pm module reads this file and derives schema
  26. * information.
  27. *
  28. *-------------------------------------------------------------------------
  29. */
  30. #ifndef PG_SHDESCRIPTION_H
  31. #define PG_SHDESCRIPTION_H
  32. #include "catalog/genbki.h"
  33. #include "catalog/pg_shdescription_d.h"
  34. /* ----------------
  35. * pg_shdescription definition. cpp turns this into
  36. * typedef struct FormData_pg_shdescription
  37. * ----------------
  38. */
  39. CATALOG(pg_shdescription,2396,SharedDescriptionRelationId) BKI_SHARED_RELATION
  40. {
  41. Oid objoid; /* OID of object itself */
  42. Oid classoid; /* OID of table containing object */
  43. #ifdef CATALOG_VARLEN /* variable-length fields start here */
  44. text description BKI_FORCE_NOT_NULL; /* description of object */
  45. #endif
  46. } FormData_pg_shdescription;
  47. /* ----------------
  48. * Form_pg_shdescription corresponds to a pointer to a tuple with
  49. * the format of pg_shdescription relation.
  50. * ----------------
  51. */
  52. typedef FormData_pg_shdescription * Form_pg_shdescription;
  53. DECLARE_TOAST_WITH_MACRO(pg_shdescription, 2846, 2847, PgShdescriptionToastTable, PgShdescriptionToastIndex);
  54. DECLARE_UNIQUE_INDEX_PKEY(pg_shdescription_o_c_index, 2397, SharedDescriptionObjIndexId, on pg_shdescription using btree(objoid oid_ops, classoid oid_ops));
  55. /* We do not use BKI_LOOKUP here because it causes problems for genbki.pl */
  56. DECLARE_FOREIGN_KEY((classoid), pg_class, (oid));
  57. #endif /* PG_SHDESCRIPTION_H */