policy.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*-------------------------------------------------------------------------
  2. *
  3. * policy.h
  4. * prototypes for policy.c.
  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/commands/policy.h
  11. *
  12. *-------------------------------------------------------------------------
  13. */
  14. #ifndef POLICY_H
  15. #define POLICY_H
  16. #include "catalog/objectaddress.h"
  17. #include "nodes/parsenodes.h"
  18. #include "utils/relcache.h"
  19. extern void RelationBuildRowSecurity(Relation relation);
  20. extern void RemovePolicyById(Oid policy_id);
  21. extern bool RemoveRoleFromObjectPolicy(Oid roleid, Oid classid, Oid objid);
  22. extern ObjectAddress CreatePolicy(CreatePolicyStmt *stmt);
  23. extern ObjectAddress AlterPolicy(AlterPolicyStmt *stmt);
  24. extern Oid get_relation_policy_oid(Oid relid, const char *policy_name,
  25. bool missing_ok);
  26. extern ObjectAddress rename_policy(RenameStmt *stmt);
  27. extern bool relation_has_policies(Relation rel);
  28. #endif /* POLICY_H */