Linked Questions

28
votes
3answers
95k views

Permission denied in Postgres [duplicate]

I added the user myuserto Postgres. Then I added the database mydatabase in the pgAdmin III GUI and restored from a backup file. So the owner of mydatabase is the superuser postgres. Then I tried to ...
0
votes
1answer
583 views

PostgreSQL Role Inheritance behavior in AWS RDS [duplicate]

I was familiarizing myself with how PostgreSQL (9.6) role management works and ran into a case that seemed to go against my understanding of the documentation. I have an RDS instance and a master ...
7
votes
2answers
24k views

Grant SELECT on all tables in Redshift

I am trying to assign SELECT privilege to a group in Redshift. So I created a group and a user in that group: CREATE GROUP data_viewers; CREATE USER <user> PASSWORD '<password>' IN GROUP ...
11
votes
1answer
69k views

Permission denied for relation <table>

I have ran the following SQL in psql: CREATE USER bspu LOGIN; CREATE DATABASE bsp OWNER bspu; GRANT ALL PRIVILEGES ON DATABASE bsp TO bspu; \c bsp CREATE TABLE users ( id SERIAL PRIMARY KEY, ...
13
votes
1answer
44k views

Grant access to all tables of a database

I recently wanted to share regular access rights with one user of a server and I realized that a simple CREATE USER and GRANT ALL ON DATABASE commands didn't let him run a simple SELECT on the data. ...
11
votes
1answer
7k views

What are the privileges required to execute a trigger function in PostgreSQL 8.4?

What are the privileges required to execute a trigger function in PostgreSQL 8.4? It seems that the privileges set to a role does not matter to execute a trigger function. I think I have seen some ...
5
votes
1answer
3k views

Can't alter default privileges

I followed the steps below. I installed PostgreSQL. I logged in as postgres via (sudo -i -u postgres) I created new user new_user via shell script createuser --interactive I granted that user ...
3
votes
1answer
5k views

How to allow user access to non-owned objects in Postgres?

I am in the process of creating a pre-prod Postgres database, and want to ensure the accessing user has limited access. I want to setup tables in such a way that the accessing user can't CREATE, DROP ...
3
votes
1answer
5k views

Alter default privileges for role

I have database called Blackacre and two roles who have access to it: johnrole and janerole. janerole has been granted ALL privileges and johnrole has only been granted the SELECT privilege. Problem ...
1
vote
1answer
1k views

Insert- and Read-only table in Postgres

I want to create an "immutable" Postgres database, where users can insert/select (write/read) data only, but can not update/delete (change/delete). I came to know there is FOR UPDATE lock, but did ...
1
vote
1answer
777 views

How to grant all privileges on a database?

There are many almost-duplicates to this question and all I found so far were wrong and/or incomplete, so I feel we need a canonical answer. In PostgreSQL, how can I grant all permissions on a ...
0
votes
3answers
179 views

Setting up a simple “permissions architecture” in PostgreSQL

I host the databases of several clients. For each database dbname, I currently have a dbnameusers role that I grant to the users of that client. I would now like to have read only "sub roles". I ...
1
vote
1answer
137 views

Permissions for runtime user on all objects in schema (including future objects)

In PostgreSQL 10 - when using an "owner user" (login role owning a schema and all tables, not used by the application at runtime) and a "runtime" user I can GRANT Select/Update/Delete permissions on ...
2
votes
1answer
78 views

Inherit default privileges: every table created by *any member of* role A is readable by role B

If I do this ... ALTER DEFAULT PRIVILEGES FOR ROLE engineering IN SCHEMA reference GRANT SELECT ON TABLES to analytics; I get ... This syntax runs and has a valid meaning. The way it is ...
0
votes
1answer
70 views

Give particular privileges for a table to existing role

My database have some tables such as: Table A Table B Table C I'm using user monitoring with read-only permission. SELECT grantee, privilege_type FROM information_schema.role_table_grants WHERE ...

15 30 50 per page