From: | David Ford <david+cert(at)blue-labs(dot)org> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: PostGres Doubt |
Date: | 2002-06-18 04:38:27 |
Message-ID: | 3D0EB943.1060304@blue-labs.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
My apologies, I was too brief in my example:
heakin=> create table interviewers ( interviewer varchar );
CREATE
heakin=> insert into interviewers values ('Ryan');
INSERT 932846 1
heakin=> select * from interviewers ;
interviewer
-------------
Ryan
(1 row)
heakin=> \z
Access privileges for database "heakin"
Table | Access privileges
-------------------+-------------------
clients | {=,heakin=arwd}
completed_surveys | {=,heakin=arwd}
interviewers |
respondents | {=,heakin=arwd}
users | {=,heakin=ar}
(5 rows)
heakin=> grant select,insert,update on interviewers to heakin;
GRANT
heakin=> \z
Access privileges for database "heakin"
Table | Access privileges
-------------------+--------------------
clients | {=,heakin=arwd}
completed_surveys | {=,heakin=arwd}
interviewers | {=,heakin=arwdRxt}
respondents | {=,heakin=arwd}
users | {=,heakin=ar}
(5 rows)
heakin=> revoke all on interviewers from heakin;
REVOKE
heakin=> \z
Access privileges for database "heakin"
Table | Access privileges
-------------------+-------------------
clients | {=,heakin=arwd}
completed_surveys | {=,heakin=arwd}
interviewers | {=}
respondents | {=,heakin=arwd}
users | {=,heakin=ar}
(5 rows)
heakin=> grant select,insert,update on interviewers to heakin;
GRANT
heakin=> \z
Access privileges for database "heakin"
Table | Access privileges
-------------------+-------------------
clients | {=,heakin=arwd}
completed_surveys | {=,heakin=arwd}
interviewers | {=,heakin=arw}
respondents | {=,heakin=arwd}
users | {=,heakin=ar}
(5 rows)
David
Tom Lane wrote:
>David Ford <david+cert(at)blue-labs(dot)org> writes:
>
>
>>Which btw has a curious grant/revoke bug. create foo; grant select on
>>foo to bar; results in all rights being granted. You must revoke and
>>grant again in order to get the correct rights set.
>>
>>
>
>I see no bug.
>
>test72=# select version();
> version
>---------------------------------------------------------------
> PostgreSQL 7.2.1 on hppa-hp-hpux10.20, compiled by GCC 2.95.3
>(1 row)
>
>test72=# create user bar;
>CREATE USER
>test72=# create table foo (f1 int);
>CREATE
>test72=# grant select on foo to bar;
>GRANT
>test72=# \z foo
>Access privileges for database "test72"
> Table | Access privileges
>-------+----------------------------
> foo | {=,postgres=arwdRxt,bar=r}
>(1 row)
>
>test72=#
>
>
regards, tom lane
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Meskes | 2002-06-18 06:16:14 | Re: PostGres Doubt |
Previous Message | Rod Taylor | 2002-06-18 02:42:22 | Domains and Casting |