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;
RESET
postgres=# select * from view1; -- it is superuser, should access all
objects.
ERROR: permission denied for relation tb2
postgres=# select * from tb2;
b
---
(0 rows)
So I think it should not have a permission error when run "select * from
view1".
Maybe I have a misconception for superuser?
regards, hx.li
----- Original Message -----
From: "Tom Lane" <tgl@sss.pgh.pa.us>
Newsgroups: pgsql.bugs
Sent: Thursday, October 29, 2009 9:34 PM
Subject: Re: [BUGS] BUG #5147: DBA can not access view
> "Dongni" <donniehan@126.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@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs
>