Re: can select contents of view but not view itself, despite indirect membership

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kevin Field <kevinjamesfield(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: can select contents of view but not view itself, despite indirect membership
Date: 2010-11-01 20:39:20
Message-ID: 5125.1288643960@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Kevin Field <kevinjamesfield(at)gmail(dot)com> writes:
> Strange, no? Anybody have any ideas why this might be?

Worksforme:

regression=# create group "user";
CREATE ROLE
regression=# create group extranet_user in group "user";
CREATE ROLE
regression=# create user x in group extranet_user;
CREATE ROLE
regression=# create view page_startup as select ...
CREATE VIEW
regression=# GRANT SELECT ON TABLE page_startup TO "user";
GRANT
regression=# set session authorization x;
SET
regression=> select * from page_startup;
[ works ]

I'm a bit suspicious of naming a group "user". I wonder whether you
outsmarted yourself somewhere along the line by failing to double-quote
that name, so that the command ended up doing something else than you
thought.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andy Colson 2010-11-01 20:46:26 Re: JDBC Transactions
Previous Message Glenn Maynard 2010-11-01 20:35:59 FTS phrase searches