pg_namespace.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*-------------------------------------------------------------------------
  2. *
  3. * pg_namespace.h
  4. * definition of the system "namespace" relation (pg_namespace)
  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_namespace.h
  12. *
  13. * NOTES
  14. * the genbki.pl script reads this file and generates .bki
  15. * information from the DATA() statements.
  16. *
  17. *-------------------------------------------------------------------------
  18. */
  19. #ifndef PG_NAMESPACE_H
  20. #define PG_NAMESPACE_H
  21. #include "catalog/genbki.h"
  22. /* ----------------------------------------------------------------
  23. * pg_namespace definition.
  24. *
  25. * cpp turns this into typedef struct FormData_pg_namespace
  26. *
  27. * nspname name of the namespace
  28. * nspowner owner (creator) of the namespace
  29. * nspacl access privilege list
  30. * ----------------------------------------------------------------
  31. */
  32. #define NamespaceRelationId 2615
  33. CATALOG(pg_namespace,2615)
  34. {
  35. NameData nspname;
  36. Oid nspowner;
  37. #ifdef CATALOG_VARLEN /* variable-length fields start here */
  38. aclitem nspacl[1];
  39. #endif
  40. } FormData_pg_namespace;
  41. /* ----------------
  42. * Form_pg_namespace corresponds to a pointer to a tuple with
  43. * the format of pg_namespace relation.
  44. * ----------------
  45. */
  46. typedef FormData_pg_namespace *Form_pg_namespace;
  47. /* ----------------
  48. * compiler constants for pg_namespace
  49. * ----------------
  50. */
  51. #define Natts_pg_namespace 3
  52. #define Anum_pg_namespace_nspname 1
  53. #define Anum_pg_namespace_nspowner 2
  54. #define Anum_pg_namespace_nspacl 3
  55. /* ----------------
  56. * initial contents of pg_namespace
  57. * ---------------
  58. */
  59. DATA(insert OID = 11 ( "pg_catalog" PGUID _null_ ));
  60. DESCR("system catalog schema");
  61. #define PG_CATALOG_NAMESPACE 11
  62. DATA(insert OID = 99 ( "pg_toast" PGUID _null_ ));
  63. DESCR("reserved schema for TOAST tables");
  64. #define PG_TOAST_NAMESPACE 99
  65. DATA(insert OID = 2200 ( "public" PGUID _null_ ));
  66. DESCR("standard public schema");
  67. #define PG_PUBLIC_NAMESPACE 2200
  68. /*
  69. * prototypes for functions in pg_namespace.c
  70. */
  71. extern Oid NamespaceCreate(const char *nspName, Oid ownerId, bool isTemp);
  72. #endif /* PG_NAMESPACE_H */