Re: Role Membership - Mailing list pgsql-general

From Carlos Mennens
Subject Re: Role Membership
Date
Msg-id AANLkTimJXXk57NDMyYuAUZ1ivwYmysOrZvbU8OZHZcSE@mail.gmail.com
Whole thread Raw
In response to Re: Role Membership  (Scott Marlowe <scott.marlowe@gmail.com>)
Responses Re: Role Membership
List pgsql-general
On Mon, Dec 20, 2010 at 12:05 PM, Scott Marlowe <scott.marlowe@gmail.com> wrote:
> Odd, mine does.  Got a complete example of creating a role and not seeing it?
>
> Here's mine:
> smarlowe=# create role stans;
> CREATE ROLE
> smarlowe=# \dg
>            List of roles
>  Role name |  Attributes  | Member of
> -----------+--------------+-----------
>  postgres  | Superuser    | {}
>           : Create role
>           : Create DB
>  smarlowe  | Superuser    | {}
>           : Create role
>           : Create DB
>  stans     | Cannot login | {}

I guess I am still confused by role / group & user accounts. If you
create a role / group called 'finance', it then shows up as a user
when I do \dg? Then how do I make users a member of the 'finance' role
/ group if they're listed just like regular users are?

easports=# CREATE ROLE finance;
CREATE ROLE
easports=# \dg
                       List of roles
 Role name |            Attributes             | Member of
-----------+-----------------------------------+-----------
 cmennens  | Superuser                         | {}
 finance   | Cannot login                      | {}
 postgres  | Superuser, Create role, Create DB | {}

From the above listing, I would expect 'finance' to not be listed with
my users since finance is a role / group, not a single user. I want to
make specific users members of 'finance'. Am I missing something or
just slow today?

>> 2. How to see which 'users' are all members of 'accounting'? Would
>> that be done simply with '\dg'?
>
> Yeah.

pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Role Membership
Next
From: Adrian Klaver
Date:
Subject: Re: Role Membership