Thread: [off-topic] obtaining the user's group

[off-topic] obtaining the user's group

From
miguel angel rojas aquino
Date:
i know this is a little off topic, but i'm unable to post this in
pgsql-general...

hi, i'm looking for the way to obtain the group to which belongs a
database user, something like "SELECT USER" to obtain the current user
name but for the group. i'm looking in the documentation, but doesn't
seem to be something like this.

so, any help would be greatly appreciated, thanks and best regards.


Re: [off-topic] obtaining the user's group

From
Tom Lane
Date:
miguel angel rojas aquino <mrojas_aquino@mail.flashmail.com> writes:
> hi, i'm looking for the way to obtain the group to which belongs a
> database user, something like "SELECT USER" to obtain the current user
> name but for the group.

Uh, this doesn't seem well-defined.  A user could belong to many groups,
or none.

            regards, tom lane

Re: [off-topic] obtaining the user's group

From
miguel angel rojas aquino
Date:
Tom Lane wrote:
> miguel angel rojas aquino <mrojas_aquino@mail.flashmail.com> writes:
>
>>hi, i'm looking for the way to obtain the group to which belongs a
>>database user, something like "SELECT USER" to obtain the current user
>>name but for the group.
>
>
> Uh, this doesn't seem well-defined.  A user could belong to many groups,
> or none.
>
>             regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>

so, there is no easy way to get this one, right?

i was trying to get the user group so my app could determine the options
that would be showed to the user, but maybe i'll need to implement my
own user/groups tables, right?

as always, thanks a lot for your help, and best whishes