AW: AW: [HACKERS] Re: [QUESTIONS] groups of users
От | Andreas Zeugswetter |
---|---|
Тема | AW: AW: [HACKERS] Re: [QUESTIONS] groups of users |
Дата | |
Msg-id | 01BD799C.47B9A610@zeugswettera.user.lan.at обсуждение исходный текст |
Список | pgsql-hackers |
>> Just tried this out, and we have a bug here: >> >> simply not implemented, not a bug. > > Then should generate a NOTICE to that effect...right now, its >misleading unless you go and do a select on pg_group to find that it >wasn't actually performed... > > As it stands now, it is a bug... Yes, I think it should scan pg_group for a valid group name. I would not make it create a group, since this might be a simple typo. >> template1=> create user tester in group pg_user; >> CREATE USER < snipped my bad mood comment here :-) > >> The group "pg_user" must already exist. But since the "in group" clause >> is currently ignored, no error shows up. > > Why? if group doesn't exist do: > >insert into pg_group values ('groname',max(grosysid)+1,'{values}'); This again I would not do to avoid typo's. create {role|group} test; -- would be preferable I think >> template1=> insert into pg_group values ('test',0,'{10}'); >> INSERT 18497 1 >> >> you created a group "test" with one user ("scrappy") as it's only member. >> This is currently the only way to do it. > Unfortunately, the above test was done at home, but here it is >again: > >template1=> select * from pg_group; >groname|grosysid|grolist >-------+--------+---------------- >pgsql | 0|{10,1044,65534} >banner | 1|{10,65534} >acctng | 2|{0,99,10} >survey | 3|{10,65534,0,206} >(4 rows) Does anybody know what grosysid is supposed to be ? I think it is checked against a valid unix group id. grosysid certainly sounds like in connex with system gid, this could be useful for "system identified groups", read write permissions on files during load/unload etc. ... In the rest of the system tables the pg_group.oid should be used, like for pg_user or pg_class, or add a field groid. This certainly needs cleanup. >template1=> create user someone in group agroup; >CREATE USER >template1=> select * from pg_group; >groname|grosysid|grolist >-------+--------+---------------- >pgsql | 0|{10,1044,65534} >banner | 1|{10,65534} >acctng | 2|{0,99,10} >survey | 3|{10,65534,0,206} >(4 rows) > >template1=> create user some in group agroup; >ERROR: defineUser: user "some" has already been created >template1=> > > There is no group 'some'...it almost looks like its doing a '~*' >match: > >template1=> select usename from pg_user; >usename >-------- >scrappy >neil >nobody >darchell >adrenlin >julie >bigtech >news >acctng >root >salesorg >someone >(12 rows) This don't sound good. Did you track it down ? Might also be a conflict with one of the id's. Andreas
В списке pgsql-hackers по дате отправления: