Welcome to Halil Demirezen's Tips and Tutorials Page
Personal
Home
Contact
Biography
Research

Projects
Tutorials
Celsus Library (TR)

Categories

LinuxNetworkComputer VisionDatabasesProgamming
vmware


POSTGRESQL: creating user, database and setting permissions 2019-07-11 08:23:29

To create a new user and limiting its access to a newly created database

postgres=# create database db1;
postgres=# create role user1;
postgres=# grant connect on database db1 to user1;
postgres=# alter role user1 login;
postgres=# c db1;
db1=> revoke all on all tables in schema pg_catalog from public;