On Mon, Dec 20, 2010 at 9:12 AM, Carlos Mennens
<carlos.mennens@gmail.com> wrote:
> So if I wanted to create a group / role for accounting, would I simply just do:
>
> CREATE ROLE accounting;
>
> My question is I can't find:
>
> 1. How to view all previously created roles on my database. '\dg'
> doesn't show me the new role I created above.
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 | {}
> 2. How to see which 'users' are all members of 'accounting'? Would
> that be done simply with '\dg'?
Yeah.