4 ms·
The Postgres documentation seems to disagree: > A user may perform SELECT, INSERT, etc. on a column if they hold that privilege for either the specific column
by tyre 2y ago
The Postgres documentation seems to disagree:
> A user may perform SELECT, INSERT, etc. on a column if they hold that privilege for either the specific column or its whole table. Granting the privilege at the table level and then revoking it for one column will not do what one might wish: the table-level grant is unaffected by a column-level operation.
- dragonwriter 2y agoYou're right, its a feature I don't use, and I didn't read enough if the docs to get the right grants.
- nprateem 2y agoThis is exactly why I've never used postgrest
- deleted 2y ago[deleted]
- fulafel 2y agoThis is also how permissions work in most other systems (eg with Unix permissions, chmod u-r matters only if there isn't a group or world read permission).
- dventimi 2y agoThat doesn't mean there isn't column-level security. It just means that `grant` and `revoke` alone are not the way to do it. The response to this criticism is the same as the response to many other criticisms among these comments: use views. https://dba.stackexchange.com/a/239656/228983 https://dba.stackexchange.com/a/239656/228983