Re: [GENERAL] Creating groups and granting privs to it

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: ddade(at)digitalstatecraft(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Creating groups and granting privs to it
Date: 2000-01-27 22:27:35
Message-ID: Pine.LNX.4.21.0001271910470.356-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

You can use GRANT x ON y TO GROUP grpname if the group exists. This should
work, unless you have a really old version.

However, creating groups (CREATE GROUP) and adding users to it (CREATE
USER ... IN GROUP) is not implemented (will be in 7.0), so you'd have to
do something like

insert into pg_group values ('grpname', 1, '{111,222}');

where '1' is an arbitrarily chosen group id, and 111 and 222 are user ids
of the members, which can be obtained from pg_user.

On 2000-01-26, Donald Dade mentioned:

> Another thing that I cannot seem to figure out how to do is this, and I
> would appreciate any help: How does one create a GROUP, add users to it, and
> grant access to the group? CREATE USER doesn't seem to understand "IN GROUP
> ~" nor does GRANT seem to understand "TO GROUP ~". Am I doing something
> wrong?
>
> Thanks,
>
> Don Dade
>
>
> ************
>
>

--
Peter Eisentraut Sernanders väg 10:115
peter_e(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Hiroshi Inoue 2000-01-27 23:59:23 RE: [SQL] RE: [GENERAL] Problem with SELECT on large negative INT4
Previous Message Web Manager 2000-01-27 21:09:51 Query with ISO caracters: wrong order?