pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
"Permission denied" on view
3+ messages / 2 participants
[nested] [flat]

* "Permission denied" on view
@ 2003-11-25 16:55 Michael A Nachbaur <mike@nachbaur.com>
  2003-11-25 17:09 ` Re: "Permission denied" on view Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Michael A Nachbaur @ 2003-11-25 16:55 UTC (permalink / raw)
  To: pgsql-sql

I'm having a strange problem that, though I found an appropriate thread in the 
mailing list archive, archives.postgresql.org seems to be down so I cannot 
see what the resolution was.

I have a database "scamp", with my own administrator user and a user "dialup".  
Inside the "scamp" database I've created the "dialup" schema, where a few 
tables reside.  I've created a view called "Dialup.UserGroups" as the 
administrator user, and then granted select access to the dialup user on all 
the tables that view uses (which are all in the public schema).

When I log into the database with the user dialup, if I perform the raw SQL 
statement it returns all the expected results, but I get the following when I 
try to select from the view:

scamp=> select * from Dialup.UserGroup;
ERROR:  dialup: permission denied

I have tried to create a similar, but differently named, view in the public 
schema to no avail.

Essentially, I want to have the dialup user have access to the tables it 
needs, but except for one table, they should all be read-only.  As such, I 
haven't set the ownership for the "dialup" schema to be owned by the "dialup" 
user.  Could this perhaps be causing some problems?

Any help on the matter would be appreciated (or getting the mailing list 
archives website up and running again ;)

-- 
/* Michael A. Nachbaur <mike@nachbaur.com>
 * http://nachbaur.com/pgpkey.asc
 */

"He expanded his chest to make it totally clear that here 
was the sort of man you only dared to cross if you had a 
team of Sherpas with you. "




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: "Permission denied" on view
  2003-11-25 16:55 "Permission denied" on view Michael A Nachbaur <mike@nachbaur.com>
@ 2003-11-25 17:09 ` Tom Lane <tgl@sss.pgh.pa.us>
  2003-11-25 17:27   ` Re: "Permission denied" on view Michael A Nachbaur <mike@nachbaur.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2003-11-25 17:09 UTC (permalink / raw)
  To: Michael A Nachbaur <mike@nachbaur.com>; +Cc: pgsql-sql

Michael A Nachbaur <mike@nachbaur.com> writes:
> scamp=> select * from Dialup.UserGroup;
> ERROR:  dialup: permission denied

You haven't granted USAGE permission on the "dialup" schema to this
user.  You need that in addition to select permission on the view itself.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: "Permission denied" on view
  2003-11-25 16:55 "Permission denied" on view Michael A Nachbaur <mike@nachbaur.com>
  2003-11-25 17:09 ` Re: "Permission denied" on view Tom Lane <tgl@sss.pgh.pa.us>
@ 2003-11-25 17:27   ` Michael A Nachbaur <mike@nachbaur.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Michael A Nachbaur @ 2003-11-25 17:27 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-sql

On Tuesday 25 November 2003 09:09 am, Tom Lane wrote:
> Michael A Nachbaur <mike@nachbaur.com> writes:
> > scamp=> select * from Dialup.UserGroup;
> > ERROR:  dialup: permission denied
>
> You haven't granted USAGE permission on the "dialup" schema to this
> user.  You need that in addition to select permission on the view itself.

Thank you; apparently I didn't RTFM closely enough.

/me goes sheepishly back to work

-- 
/* Michael A. Nachbaur <mike@nachbaur.com>
 * http://nachbaur.com/pgpkey.asc
 */

"`Credit?' he said. `Aaaargggh...'
These two words are usually coupled together in the Old 
Pink Dog Bar."





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2003-11-25 17:27 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-11-25 16:55 "Permission denied" on view Michael A Nachbaur <mike@nachbaur.com>
2003-11-25 17:09 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-11-25 17:27   ` Michael A Nachbaur <mike@nachbaur.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox