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

Re: BUG #5147: DBA can not access view

From: "donniehan" <donniehan(at)126(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5147: DBA can not access view
Date: 2009-11-02 06:53:42
Message-ID: hclvln$dv4$ (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Hi Tom,

I agree with Hxli. It may be a good way to add permissions check when create the view.

I also find 2 pieces of words in the document about the owner of the object.

"By default, only the owner of an object can do anything with the object."

" the owner has all privileges by default."

In my case, as the view1 is already owned by user1, so user1 should has all privileges of view1, but user1 can not select from view1, I am very confused by these words. So it maybe necessary to check the user's permissions when he create the object.

"" <fly2nn(at)126(dot)com> 写入消息 news:hclr5f$2nr7$1(at)news(dot)hub(dot)org(dot)(dot)(dot)> I think it is right---the superuser can select from> the view, even if the view's owner tries to prevent that---,> > but maybe a good way is checking owner's privilage when creating a view as > Oracle.> > It would be better not to create a view if a user cann`t access a table.> > regards,> > "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> 写入消息新闻:6863(dot)1257132736(at)sss(dot)pgh(dot)pa(dot)us(dot)(dot)(dot)>> "" <fly2nn(at)126(dot)com> writes:>>> In postgresql's document,Part VI. Reference,SQL Commands,GRANT, it said:>>>>> It should be noted that database superusers can access all objects>>> regardless of object privilege settings.>>>> What that means in this example is that the superuser can select from>> the view, even if the view's owner tries to prevent that.  However,>> the view itself doesn't have any more permissions than it had before.>> It would have failed for anyone, and it fails for the superuser too.>>>> I grow weary of debating this with you.>>>> regards, tom lane>>>> -- >> Sent via pgsql-bugs mailing list (pgsql-bugs(at)postgresql(dot)org)>> To make changes to your subscription:>>>> > >

In response to


pgsql-bugs by date

Next:From: Craig RingerDate: 2009-11-02 07:26:36
Subject: Re: Postmaster hangs
Previous:From: hx.liDate: 2009-11-02 05:36:41
Subject: Re: BUG #5147: DBA can not access view

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