Role information table name

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Role information table name

Gaurav Tomar
Simple question -- in which table postgres store the role privilege information.

 CREATE ROLE postgres WITH
  LOGIN
  SUPERUSER
  INHERIT
  CREATEDB
  CREATEROLE
  REPLICATION;

in which table I can find the above information.

Regards,

Gaurav


Reply | Threaded
Open this post in threaded view
|

Re: Role information table name

Jonathan S. Katz


On Jul 8, 2020, at 1:25 PM, Gaurav Tomar <[hidden email]> wrote:

Simple question -- in which table postgres store the role privilege information.

 CREATE ROLE postgres WITH
  LOGIN
  SUPERUSER
  INHERIT
  CREATEDB
  CREATEROLE
  REPLICATION;

in which table I can find the above information.

pg_catalog.pg_authid


Jonathan

Reply | Threaded
Open this post in threaded view
|

Re: Role information table name

David G Johnston
In reply to this post by Gaurav Tomar
On Wednesday, July 8, 2020, Gaurav Tomar <[hidden email]> wrote:
Simple question -- in which table postgres store the role privilege information.

 CREATE ROLE postgres WITH
  LOGIN
  SUPERUSER
  INHERIT
  CREATEDB
  CREATEROLE
  REPLICATION;

in which table I can find the above information.



David J.

Reply | Threaded
Open this post in threaded view
|

Re: Role information table name

Stephen Frost
In reply to this post by Gaurav Tomar
Greetings,

* Gaurav Tomar ([hidden email]) wrote:

> Simple question -- in which table postgres store the role
> privilege information.
>
>  CREATE ROLE postgres WITH
>   LOGIN
>   SUPERUSER
>   INHERIT
>   CREATEDB
>   CREATEROLE
>   REPLICATION;
>
> in which table I can find the above information.
While this is in pg_authid, if that's all the info you want to find out,
you should probably be getting it from pg_roles (which is a view over
pg_authid), since you need to be GRANT'd access to pg_authid unless
you're a superuser.

Thanks,

Stephen

signature.asc (836 bytes) Download Attachment