Re: Rights for view.

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:17:05
Message-ID: 3E492201.6010601@dekasoft.com.ua
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane пишет:

>Viacheslav N Tararin <taras(at)dekasoft(dot)com(dot)ua> writes:
>
>
>>I have table table1 with owner user1;
>>I have view view1 based only on table1 owner user1 too.
>>I have user2 which not own anything.
>>user1 grant rights to select on view1 to user2.
>>Why user2 when try select from view1 get 'table1: permission denied'?
>>
>>
>
>You'll need to give more details, because as far as I can tell that
>works:
>
---- My test script ----
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

Thanks

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next 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
Previous Message Jan Wieck 2003-02-11 15:45:53 Re: Maximum length of a query