pg_policy.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * pg_policy.h
  3. * definition of the system "policy" relation (pg_policy)
  4. *
  5. * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
  6. * Portions Copyright (c) 1994, Regents of the University of California
  7. *
  8. */
  9. #ifndef PG_POLICY_H
  10. #define PG_POLICY_H
  11. #include "catalog/genbki.h"
  12. /* ----------------
  13. * pg_policy definition. cpp turns this into
  14. * typedef struct FormData_pg_policy
  15. * ----------------
  16. */
  17. #define PolicyRelationId 3256
  18. CATALOG(pg_policy,3256)
  19. {
  20. NameData polname; /* Policy name. */
  21. Oid polrelid; /* Oid of the relation with policy. */
  22. char polcmd; /* One of ACL_*_CHR, or '*' for all */
  23. #ifdef CATALOG_VARLEN
  24. Oid polroles[1]; /* Roles associated with policy, not-NULL */
  25. pg_node_tree polqual; /* Policy quals. */
  26. pg_node_tree polwithcheck; /* WITH CHECK quals. */
  27. #endif
  28. } FormData_pg_policy;
  29. /* ----------------
  30. * Form_pg_policy corresponds to a pointer to a row with
  31. * the format of pg_policy relation.
  32. * ----------------
  33. */
  34. typedef FormData_pg_policy *Form_pg_policy;
  35. /* ----------------
  36. * compiler constants for pg_policy
  37. * ----------------
  38. */
  39. #define Natts_pg_policy 6
  40. #define Anum_pg_policy_polname 1
  41. #define Anum_pg_policy_polrelid 2
  42. #define Anum_pg_policy_polcmd 3
  43. #define Anum_pg_policy_polroles 4
  44. #define Anum_pg_policy_polqual 5
  45. #define Anum_pg_policy_polwithcheck 6
  46. #endif /* PG_POLICY_H */