Thread: Role information table name

Role information table name

From
Gaurav Tomar
Date:
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


Re: Role information table name

From
Jonathan Katz
Date:


On Jul 8, 2020, at 1:25 PM, Gaurav Tomar <gauravtomar14@gmail.com> 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

Re: Role information table name

From
"David G. Johnston"
Date:
On Wednesday, July 8, 2020, Gaurav Tomar <gauravtomar14@gmail.com> 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.

Re: Role information table name

From
Stephen Frost
Date:
Greetings,

* Gaurav Tomar (gauravtomar14@gmail.com) 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

Attachment