Обсуждение: Creating groups and granting privs to it

Поиск
Список
Период
Сортировка

Creating groups and granting privs to it

От
"Donald Dade"
Дата:
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
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com


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

От
Peter Eisentraut
Дата:
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