pg_authid.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*-------------------------------------------------------------------------
  2. *
  3. * pg_authid.h
  4. * definition of the "authorization identifier" system catalog (pg_authid)
  5. *
  6. * pg_shadow and pg_group are now publicly accessible views on pg_authid.
  7. *
  8. *
  9. * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
  10. * Portions Copyright (c) 1994, Regents of the University of California
  11. *
  12. * src/include/catalog/pg_authid.h
  13. *
  14. * NOTES
  15. * The Catalog.pm module reads this file and derives schema
  16. * information.
  17. *
  18. *-------------------------------------------------------------------------
  19. */
  20. #ifndef PG_AUTHID_H
  21. #define PG_AUTHID_H
  22. #include "catalog/genbki.h"
  23. #include "catalog/pg_authid_d.h"
  24. /* ----------------
  25. * pg_authid definition. cpp turns this into
  26. * typedef struct FormData_pg_authid
  27. * ----------------
  28. */
  29. CATALOG(pg_authid,1260,AuthIdRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID(2842,AuthIdRelation_Rowtype_Id) BKI_SCHEMA_MACRO
  30. {
  31. Oid oid; /* oid */
  32. NameData rolname; /* name of role */
  33. bool rolsuper; /* read this field via superuser() only! */
  34. bool rolinherit; /* inherit privileges from other roles? */
  35. bool rolcreaterole; /* allowed to create more roles? */
  36. bool rolcreatedb; /* allowed to create databases? */
  37. bool rolcanlogin; /* allowed to log in as session user? */
  38. bool rolreplication; /* role used for streaming replication */
  39. bool rolbypassrls; /* bypasses row-level security? */
  40. int32 rolconnlimit; /* max connections allowed (-1=no limit) */
  41. /* remaining fields may be null; use heap_getattr to read them! */
  42. #ifdef CATALOG_VARLEN /* variable-length fields start here */
  43. text rolpassword; /* password, if any */
  44. timestamptz rolvaliduntil; /* password expiration time, if any */
  45. #endif
  46. } FormData_pg_authid;
  47. /* ----------------
  48. * Form_pg_authid corresponds to a pointer to a tuple with
  49. * the format of pg_authid relation.
  50. * ----------------
  51. */
  52. typedef FormData_pg_authid *Form_pg_authid;
  53. DECLARE_TOAST_WITH_MACRO(pg_authid, 4175, 4176, PgAuthidToastTable, PgAuthidToastIndex);
  54. DECLARE_UNIQUE_INDEX(pg_authid_rolname_index, 2676, AuthIdRolnameIndexId, on pg_authid using btree(rolname name_ops));
  55. DECLARE_UNIQUE_INDEX_PKEY(pg_authid_oid_index, 2677, AuthIdOidIndexId, on pg_authid using btree(oid oid_ops));
  56. #endif /* PG_AUTHID_H */