Re: AW: [HACKERS] Re: [QUESTIONS] groups of users

From: The Hermit Hacker <scrappy(at)hub(dot)org>
To: Andreas Zeugswetter <andreas(dot)zeugswetter(at)telecom(dot)at>
Cc: "'hackers(at)postgresql(dot)org'" <hackers(at)postgresql(dot)org>
Subject: Re: AW: [HACKERS] Re: [QUESTIONS] groups of users
Date: 1998-05-06 15:37:59
Message-ID: Pine.NEB.3.95.980506113140.6920D-100000@hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message ocie 1998-05-06 17:49:51 Re: [HACKERS] OK to send e-mail?
Previous Message Thomas G. Lockhart 1998-05-06 14:06:01 Re: [HACKERS] non-functional update notice unneccesarily