Re: Grant select on view

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: thiemo <thiemo(at)gmx(dot)ch>
Cc: pgNovice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Grant select on view
Date: 2002-04-01 15:14:42
Message-ID: 3900.1017674082@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

thiemo <thiemo(at)gmx(dot)ch> writes:
> Oh, sure. A self-compiled 7.2, without any source code modifications. I=20
> first instal a sequence:

You're still not being specific enough, because as closely as I can
reproduce your example, it works fine:

regression=# CREATE SEQUENCE seq;
CREATE
regression=# CREATE TABLE base (
regression(# att1 int default nextval('seq'),
regression(# att2 text,
regression(# attn varchar);
CREATE
regression=# CREATE VIEW vie AS select * from base
regression-# WHERE attn = CURRENT_USER::varchar;
CREATE
regression=# create user usr;
CREATE USER
regression=# GRANT SELECT ON vie TO usr;
GRANT
regression=# \c - usr
You are now connected as new user usr.
regression=> select * from base;
ERROR: base: Permission denied.
regression=> select * from vie;
att1 | att2 | attn
------+------+------
(0 rows)

regression=>

It's not apparent to me what you did differently from the above
to cause a permissions problem.

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message kent.rigby 2002-04-01 15:33:27 Errors creating my first database
Previous Message thiemo 2002-04-01 08:22:39 Re: Grant select on view