I try to grant privileges like that:
zielony=# GRANT ALL PRIVILEGES ON DATABASE baza_tag to strona_user;
GRANT
But nothing happends:
usename | usesysid | usecreatedb | usesuper | usecatupd | userepl | passwd | valuntil | useconfig
-------------+----------+-------------+----------+-----------+---------+----------+----------+-----------
postgres | 10 | t | t | t | t | ******** | |
zielony | 16384 | t | t | t | t | ******** | |
strona_user | 16440 | f | f | f | f | ******** | |
Also I don't have any access via php. What am i missing?
Another way to do this is to use the information_schema schema and query the table_privileges table as: $ SELECT * FROM information_schema. table_privileges LIMIT 5; The above query will show detailed information about user privileges on databases as well as tables.
Postgresql rights system doesn't work like that. You will have to set rights on the objects them selves. Like so:
GRANT ALL ON ALL TABLES IN SCHEMA public TO strona_user;
GRANT ALL ON ALL SEQUENCES IN SCHEMA public TO strona_user;
GRANT ALL ON ALL FUNCTIONS IN SCHEMA public TO strona_user;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With