Re: view to get all role privileges
От | Raghu Ram |
---|---|
Тема | Re: view to get all role privileges |
Дата | |
Msg-id | CALnrrJTkmg+3jT5v6AWaZz4AcofBBZpUchiNunN+bAyivQU9Fw@mail.gmail.com обсуждение исходный текст |
Ответ на | view to get all role privileges ("Huang, Suya" <Suya.Huang@au.experian.com>) |
Ответы |
Re: view to get all role privileges
|
Список | pgsql-novice |
On Thu, Nov 7, 2013 at 10:05 AM, Huang, Suya <Suya.Huang@au.experian.com> wrote:
Hello,
I’m using Greenplum 4.2.3.0 and did a backup/restore using gpcrondump. However, after it completed, I found some of the privileges are missing in the new database. for example, the privilege of a particular user to create schema in the database.
Can someone tell me which view in Postgresql is used to check all privileges granted to a specific user?
- \dg[+] [ pattern ]
Lists database roles. If pattern is specified, only those roles whose names match the pattern are listed. (This command is now effectively the same as \du). If the form \dg+ is used, additional information is shown about each role, including the comment for each role.
=> \dp mytable Access privilegesSchema | Name | Type | Access privileges | Column access privileges --------+---------+-------+-----------------------+--------------------------public | mytable | table | miriam=arwdDxt/miriam | col1: : =r/miriam : miriam_rw=rw/miriam : admin=arw/miriam (1 row)
The entries shown by \dp are interpreted thus:
rolename=xxxx -- privileges granted to a role =xxxx -- privileges granted to PUBLIC r -- SELECT ("read") w -- UPDATE ("write") a -- INSERT ("append") d -- DELETE D -- TRUNCATE x -- REFERENCES t -- TRIGGER X -- EXECUTE U -- USAGE C -- CREATE c -- CONNECT T -- TEMPORARY arwdDxt -- ALL PRIVILEGES (for tables, varies for other objects) * -- grant option for preceding privilege /yyyy -- role that granted this privilege
В списке pgsql-novice по дате отправления: