Re: AW: [HACKERS] Re: [QUESTIONS] groups of users
От | The Hermit Hacker |
---|---|
Тема | Re: AW: [HACKERS] Re: [QUESTIONS] groups of users |
Дата | |
Msg-id | Pine.NEB.3.95.980506113140.6920D-100000@hub.org обсуждение исходный текст |
Ответ на | AW: [HACKERS] Re: [QUESTIONS] groups of users (Andreas Zeugswetter <andreas.zeugswetter@telecom.at>) |
Список | pgsql-hackers |
On Wed, 6 May 1998, Andreas Zeugswetter wrote: > > 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... > template1=> create user tester in group pg_user; > CREATE USER > > so "pg_user" is supposed to be a new group name (not a good name) Sorry, just picked the first thing that came into my head :) > 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}'); > template1=> select * from pg_user; > usename|usesysid|usecreatedb|usetrace|usesuper|usecatupd|passwd |valuntil > -------+--------+-----------+--------+--------+---------+--------+---------------------------- > pgsql | 1005|t |t |t |t |********|Sat Jan 31 02:00:00 2037 AST > scrappy| 10|t |t |t |t |********| > tester | 1006|f |t |f |t |********| > (3 rows) > > template1=> insert into pg_group values ('test',0,'{scrappy}'); > ERROR: pg_atoi: error in "scrappy": can't parse "scrappy" > 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) 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)
В списке pgsql-hackers по дате отправления: