Re: [GENERAL] Creating groups and granting privs to it - Mailing list pgsql-general

From Peter Eisentraut
Subject Re: [GENERAL] Creating groups and granting privs to it
Date
Msg-id Pine.LNX.4.21.0001271910470.356-100000@localhost.localdomain
Whole thread Raw
In response to Creating groups and granting privs to it  ("Donald Dade" <don_dade@hotmail.com>)
List 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@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden



pgsql-general by date:

Previous
From: Web Manager
Date:
Subject: Query with ISO caracters: wrong order?
Next
From: "Hiroshi Inoue"
Date:
Subject: RE: [SQL] RE: [GENERAL] Problem with SELECT on large negative INT4