K
K
Kastuś2018-10-01 13:33:25
PostgreSQL
Kastuś, 2018-10-01 13:33:25

How to set database permissions for a user in postgresql?

There is a base.
There is a postgresql superuser with all rights.
How to set rights to the database for a new user.
create via CREATE USER newuser WITH PASSWORD 'password';
give rights GRANT ALL PRIVILEGES ON DATABASE base1 TO newuser;
and it doesn't work....
I have several schemas in the database: public, root, base
Is there a command to give all rights to only one database in potgtgresql? (SELECT, UPDATE, DELETE, INSERT)
(no explicit schema selection)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Cheypnow, 2018-10-01
@Gytim

https://postgrespro.ru/docs/postgresql/9.6/sql-grant

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question