Unable to GRANT SELECT on all columns (have to be explicit about which columns)
See original GitHub issueThanks for this library! Searched but didn’t see anything about this. It seems like to GRANT SELECT
using PGGrantTable
, we need to explicitly specify which columns to GRANT SELECT
. This excludes statements like the following from being easily encoded with this class:
GRANT SELECT ON <table> to <user>;
Was just curious if this was something that had been encountered yet.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Grant UPDATE and SELECT on specific columns in a table
This post briefs how we can Grant UPDATE and SELECT permissions to specific columns of a table in SQL Server without using a...
Read more >Why does COUNT(*) require SELECT permission on all table ...
The best solution is probably to create a view that explicitly excludes columns Intern should not see, and grant SELECT permission on that....
Read more >Explicitly granting permissions to update the sequence for a ...
Safely rename tables using serial primary key columns ... GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA public TO username;.
Read more >Grant select to user only to certain columns. Is it possible?.
Best Answer. You can't grant privilage to specific column. You can do it only for update, insert and references.
Read more >Documentation: 9.1: GRANT - PostgreSQL
The GRANT command has two basic variants: one that grants privileges on a database ... The possible privileges are: SELECT. Allows SELECT from...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey, just wanted to let you know that this did seem to work! Once I wired it up and autogenerated a migration it was able to recognize a GRANT that already existed in the DB and not generate a line for that GRANT in the
upgrade
/downgrade
functions.However after some thinking I think I’m going to go with Ansible for keeping GRANTS in sync as I think it’ll be simpler / offer more clarity as to the current state of the DB. Really appreciate your help though.
whoops, i misunderstood
if you’re feeling adventurous you could dynamically populate the columns from the database in
env.py
before passing them toregister_entities
if you do decide to do something like that, please let me know how it goes