Online Documentation Server
 ПОИСК
ods.com.ua Web
 КАТЕГОРИИ
Home
Programming
Net technology
Unixes
Security
RFC, HOWTO
Web technology
Data bases
Other docs

 


 ПОДПИСКА

 О КОПИРАЙТАХ
Вся предоставленная на этом сервере информация собрана нами из разных источников. Если Вам кажется, что публикация каких-то документов нарушает чьи-либо авторские права, сообщите нам об этом.




User Names and Groups

User Names and Groups

To define a new user, run the createuser utility program.

To assign a user or set of users to a new group, one must define the group itself, and assign users to that group. In Postgres these steps are not currently supported with a create group command. Instead, the groups are defined by inserting appropriate values into the pg_group system table, and then using the grant command to assign privileges to the group.

Creating Users

Creating Groups

Currently, there is no easy interface to set up user groups. You have to explicitly insert/update the pg_group table. For example:

jolly=> insert into pg_group (groname, grosysid, grolist)
jolly=>     values ('posthackers', '1234', '{5443, 8261}');
INSERT 548224
jolly=> grant insert on foo to group posthackers;
CHANGE
jolly=>
     

The fields in pg_group are:

groname

The group name. This a name and should be purely alphanumeric. Do not include underscores or other punctuation.

grosysid

The group id. This is an int4. This should be unique for each group.

grolist

The list of pg_user id's that belong in the group. This is an int4[].

Assigning Users to Groups



With any suggestions or questions please feel free to contact us