AW: [HACKERS] Re: PostgreSQL reference manual
От | Zeugswetter Andreas |
---|---|
Тема | AW: [HACKERS] Re: PostgreSQL reference manual |
Дата | |
Msg-id | 01BD57DE.61FD7A40@pc9358.sd.spardat.at обсуждение исходный текст |
Список | pgsql-hackers |
>> > > I have another question about GRANT/REVOKE: >> > > >> > > grant <privilege[,privilege,...]> >> > > on <rel1>[,...<reln>] >> > > to [public | GROUP <group> | <username>] >> > > ^^^^^^^^^^^^^ >> > > I don't know how to create a GROUP ? >> > >> > I believe that you use "CREATE USER groupname", and then can assign >> > privileges to that pseudo-user/group, and then add users to that >> > group. Have you tried that? >> postgres=> create user grupo; >> CREATE USER No, do this: insert into pg_group values ('grupo', 100, '{6}'); >> postgres=> grant all on tmp to grupo; >> CHANGE >> create user joe in group grupo; looks like this is ignored ? >> CREATE USER >> postgres=> grant select on tmp to group grupo; >> ERROR: non-existent group "grupo" > >Can someone tell us how "groups" work? I'm not finding enough clues just >by looking in the parser, and haven't stumbled across it in the docs... I have no idea what the grosysid is supposed to be, I only notice, that 100 works while 18204 crashes psql. To be consistent with pg_user I think it should hold the unix group id, if the group also exists in /etc/groups. If not, from what I see in the sources it must still be unique, see src/backend/catalog/aclchk.c ** this code is a little mess really ** The field grolist has to be manually maintained currently. It contains an array of usesysid's of the users in this group. (select usesysid from pg_user where usename='joe';) Andreas
В списке pgsql-hackers по дате отправления: