[HACKERS] Role members

2007-05-21 Thread Akmal Akmalhojaev
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,

Re: [HACKERS] Role members

2007-05-21 Thread Richard Huxton
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

Re: [HACKERS] Role members

2007-05-21 Thread Richard Huxton
Akmal Akmalhojaev wrote: It doesn't mean if there is inherit flag. I'm looking for a C function like SearchSysCache() or smth. Ah - I think the file you neeed to look in is backend/utils/adt/acl.c - I think it's looking at things the other way around. That is - is the current role a member