How to list database privileges on postgres show grants?

1.2K    Asked by CarlPaige in SQL Server , Asked on Sep 29, 2022

 I'm in the middle of a database server migration and I can't figure (after googling and searching here) how can I list the database privileges (or all the privileges across the server) on PostgreSQL using the psql command line tool?

I'm on Ubuntu 11.04 and my PostgreSQL version is 8.2.x.

Answered by Carol Bower

perhaps you mean listing users and their privileges for a database on postgres show grants


postgres=> du

                             List of roles

    Role name | Attributes | Member of

-----------------+--------------+------------------------------------------------

 dba | Create role | {util_user,helpdesk_user,helpdesk_admin}

 helpdesk_admin | Cannot login | {helpdesk_user}

 helpdesk_user | Cannot login | {helpdesk_reader}

 jack | | {helpdesk_admin}

 postgres | Superuser | {}

                 : Create role

                 : Create DB



Your Answer

Interviews

Parent Categories