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

Re: BUG #5147: DBA can not access view

From: "hx(dot)li" <fly2nn(at)126(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5147: DBA can not access view
Date: 2009-10-30 06:32:07
Message-ID: hce19a$2v0u$ (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
In document<SQL Commands --- grant>, it said:

It should be noted that database superusers can access all objects 
regardless of object privilege settings. This is comparable to the rights of 
root in a Unix system. As with root, it's unwise to operate as a superuser 
except when absolutely necessary.

But Dongni's test case:

postgres=> reset session authorization;
postgres=# select * from view1; -- it is superuser, should access all 
ERROR:  permission denied for relation tb2
postgres=# select * from tb2;
(0 rows)

So I think it should not have a permission error when run "select * from 

Maybe I have a misconception for superuser?


----- Original Message ----- 
From: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Newsgroups: pgsql.bugs
Sent: Thursday, October 29, 2009 9:34 PM
Subject: Re: [BUGS] BUG #5147: DBA can not access view

> "Dongni" <donniehan(at)126(dot)com> writes:
>> Description:        DBA can not access view
> This is not a bug.  The view is owned by user1 and what the view can
> access is determined by user1's permissions, independently of who is
> calling it.
> regards, tom lane
> -- 
> Sent via pgsql-bugs mailing list (pgsql-bugs(at)postgresql(dot)org)
> To make changes to your subscription:


pgsql-bugs by date

Next:From: Boris FolgmannDate: 2009-10-30 09:55:06
Subject: BUG #5151: autovacuum process segfaults when max_fsm_pages are too low
Previous:From: Stefan KaltenbrunnerDate: 2009-10-30 06:21:17
Subject: Re: BUG #5145: Complex query with lots of LEFT JOIN causes segfault

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