Role and grants

From: "Fran (dot)(dot)(dot)" <Bryan691(at)hotmail(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Role and grants
Date: 2016-11-09 19:05:23
Message-ID: AM4PR03MB1748DE418FA3145ED6D8DB2E97B90@AM4PR03MB1748.eurprd03.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I am a new user with PostgreSQL, I came from MySQL and I am experiencing some issues with roles and privileges.

I have created a DB,user and grant privilege on this DB to this user. How could I check what is the privileges/permissions for this user?

Transcript:

postgres=# create database test;
CREATE DATABASE
postgres=# create user test with password 'test';
CREATE ROLE
postgres=# grant all privileges on database test to test;
GRANT
postgres=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+----------+----------+-------------+-------------+-----------------------
postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
test | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/postgres +
| | | | | postgres=CTc/postgres+
| | | | | test=CTc/postgres
test1 | test1 | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/test1 +
| | | | | test1=CTc/test1
(5 rows)

With "\l" command It's no clear.

Finally, I don't find some command like "show grants for..." in MySQL.

Regards.

Bryan

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Melvin Davidson 2016-11-09 19:53:02 Re: Role and grants
Previous Message Scott Marlowe 2016-11-09 18:58:09 Re: Postgresql errors on Windows with F-Secure AntiVirus