Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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;
regression=# CREATE TABLE base (
regression(# att1 int default nextval('seq'),
regression(# att2 text,
regression(# attn varchar);
regression=# CREATE VIEW vie AS select * from base
regression-# WHERE attn = CURRENT_USER::varchar;
regression=# create user usr;
regression=# GRANT SELECT ON vie TO usr;
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)


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

			regards, tom lane

In response to


pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group