From: | Viacheslav N Tararin <taras(at)dekasoft(dot)com(dot)ua> |
---|---|
To: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Rights for view. |
Date: | 2003-02-11 16:28:02 |
Message-ID: | 3E492492.9060208@dekasoft.com.ua |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thanks.
(heaped up, though)
Tom Lane пишет:
>>create user user2 password 'u2';
>>create schema user2;
>>create table user2.table1(t1 integer);
>>create view user2.view1 as select * from user2.table1;
>>grant select on user2.view1 to user2;
>>\c - user2;
>>select * from user2.view1;
>>select * from user2.table1;
>>
>>
>
>
>
>>---- My output -----
>>CREATE USER
>>CREATE SCHEMA
>>CREATE TABLE
>>CREATE VIEW
>>GRANT
>>You are now connected as new user user2.
>>psql:test.sql:7: ERROR: user2: permission denied
>>psql:test.sql:8: ERROR: user2: permission denied
>>
>>
>
>It's complaining about the user2 schema, which is owned by user1
>(or whoever did that CREATE SCHEMA) and has no permissions for
>user2 to access it. You need at least
>
>grant usage on schema user2 to user2;
>
>Alternatively you might have wanted to make the user2 schema be
>owned by user2 in the first place.
>
> regards, tom lane
>
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Bodanapu, Sravan | 2003-02-11 16:30:45 | Table Partitioning in Postgres: |
Previous Message | Greg Stark | 2003-02-11 16:19:13 | Is Hash Agg being used? 7.4 seems to handle this query worse than 7.3 |