Re: Role members - Mailing list pgsql-ru-general

From Alexey Klyukin
Subject Re: Role members
Date
Msg-id 4651827E.6080506@commandprompt.com
Whole thread Raw
List pgsql-ru-general
Добрый день,

Можно попробовать использовать pg_has_role вместе с select, например так:

select rolname from pg_authid where pg_has_role(rolname, 'ID1', 'member');

где ID1 - имя роли, для которой ищуться все роли, входящие в нее.

Akmal Akmalhojaev wrote:
> Hello! I have the following question.
>
> For example I have a role ID1 with members ID2 and ID3.
> Role ID2 has also members ID4 and ID5. It means that roles ID4 and ID5 are
> members of ID1.
> The question: Is there any function in PostgreSQL, that finds all the
> members of role ID1 - even such members, as ID4 and ID5.
>
> Thanks.
>


--
Alexey Klyukin                         http://www.commandprompt.com/
The PostgreSQL Company - Command Prompt, Inc.

pgsql-ru-general by date:

Previous
From: "Akmal Akmalhojaev"
Date:
Subject: Role members
Next
From: "Akmal Akmalhojaev"
Date:
Subject: Где хранятся привилегии