Permission for pg_shadow.

Started by AI Rummanover 14 years ago3 messagesgeneral
Jump to latest
#1AI Rumman
rummandba@gmail.com

I have an application which query on the pg_shadow view. But the user that I
was provided by my hosting server does have permission to do that.
I checked that only superuser can query in pg_shadow view. But hosting
service provider will not give me superuser permission.
Is there any other alternative way that I may follow?
Please suggest me.

Thanks

#2Alban Hertroys
haramrae@gmail.com
In reply to: AI Rumman (#1)
Re: Permission for pg_shadow.

On 10 October 2011 10:30, AI Rumman <rummandba@gmail.com> wrote:

I have an application which query on the pg_shadow view. But the user that I
was provided by my hosting server does have permission to do that.
I checked that only superuser can query in pg_shadow view. But hosting
service provider will not give me superuser permission.
Is there any other alternative way that I may follow?
Please suggest me.

According to the documentation at
http://www.postgresql.org/docs/8.3/static/view-pg-shadow.html you
should be using pg_user instead of pg_shadow (which has been
deprecated BTW).

That may not solve your issue with the database hosting provider. If I
would be hosting a database server for multiple customers, I would
block access to even that view - the accounts of other database users
(other customers) are simply none of your business.

Your best bet would be to find some other way to do whatever you're
using pg_shadow for. Something that will only involve users of your
own database(s).

--
If you can't see the forest for the trees,
Cut the trees and you'll see there is no forest.

#3Laurenz Albe
laurenz.albe@cybertec.at
In reply to: AI Rumman (#1)
Re: Permission for pg_shadow.

AI Rumman wrote:

I have an application which query on the pg_shadow view. But the user

that I was provided by my

hosting server does have permission to do that.
I checked that only superuser can query in pg_shadow view. But hosting

service provider will not give

me superuser permission.
Is there any other alternative way that I may follow?

You'll have to use pg_user or pg_roles.

They won't show you the passwords though.

Yours,
Laurenz Albe