1 | /*------------------------------------------------------------------------- |
2 | * |
3 | * policy.h |
4 | * prototypes for policy.c. |
5 | * |
6 | * |
7 | * Portions Copyright (c) 1996-2019, 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 | |
15 | #ifndef POLICY_H |
16 | #define POLICY_H |
17 | |
18 | #include "catalog/objectaddress.h" |
19 | #include "nodes/parsenodes.h" |
20 | #include "utils/relcache.h" |
21 | |
22 | extern void RelationBuildRowSecurity(Relation relation); |
23 | |
24 | extern void RemovePolicyById(Oid policy_id); |
25 | |
26 | extern bool RemoveRoleFromObjectPolicy(Oid roleid, Oid classid, Oid objid); |
27 | |
28 | extern ObjectAddress CreatePolicy(CreatePolicyStmt *stmt); |
29 | extern ObjectAddress AlterPolicy(AlterPolicyStmt *stmt); |
30 | |
31 | extern Oid get_relation_policy_oid(Oid relid, const char *policy_name, |
32 | bool missing_ok); |
33 | |
34 | extern ObjectAddress rename_policy(RenameStmt *stmt); |
35 | |
36 | extern bool relation_has_policies(Relation rel); |
37 | |
38 | #endif /* POLICY_H */ |
39 | |