Skip to content

Commit 3d30a9e

Browse files
committed
Update concepts-security.md
1 parent b89ab5f commit 3d30a9e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

articles/postgresql/flexible-server/concepts-security.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,18 @@ CREATE POLICY account_managers ON accounts TO managers
191191
```
192192

193193
The USING clause implicitly adds a `WITH CHECK` clause, ensuring that members of the manager role can't perform `SELECT`, `DELETE`, or `UPDATE` operations on rows that belong to other managers, and can't `INSERT` new rows belonging to another manager.
194+
You can drop a row security policy by using DROP POLICY command , as in his example:
195+
```sql
196+
197+
198+
DROP POLICY account_managers ON accounts;
199+
```
200+
Although you may have have dropped the policy, role manager is still not able to view any data that belong to any other manager. This is because the row-level security policy is still enabled on the accounts table. If row-level security is enabled by default, PostgreSQL uses a default-deny policy. You can disable row level security, as in example below:
201+
202+
```sql
203+
ALTER TABLE accounts DISABLE ROW LEVEL SECURITY;
204+
```
205+
194206

195207
## Bypassing Row Level Security
196208

0 commit comments

Comments
 (0)