pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
How to list all the privileges a user has?
2+ messages / 2 participants
[nested] [flat]

* How to list all the privileges a user has?
@ 2006-05-06 12:25 kynn@panix.com
  2006-05-07 06:19 ` Re: How to list all the privileges a user has? Ben K. <bkim@coe.tamu.edu>
  0 siblings, 1 reply; 2+ messages in thread

From: kynn@panix.com @ 2006-05-06 12:25 UTC (permalink / raw)
  To: pgsql-admin




My apologies for all these questions.  I hope this will be the last
one for a while.

I guess the subject line says it all: how does one list all the
privileges a given user has?

Thanks!

kj

I'm aware of functions like has_table_privilege(), etc., but they
don't do what I want.



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

* Re: How to list all the privileges a user has?
  2006-05-06 12:25 How to list all the privileges a user has? kynn@panix.com
@ 2006-05-07 06:19 ` Ben K. <bkim@coe.tamu.edu>
  0 siblings, 0 replies; 2+ messages in thread

From: Ben K. @ 2006-05-07 06:19 UTC (permalink / raw)
  To: kynn@panix.com; +Cc: pgsql-admin

> My apologies for all these questions.  I hope this will be the last
> one for a while.
> I guess the subject line says it all: how does one list all the
> privileges a given user has?

# select relname, array_to_string(relacl,',') as acl from pg_class 
where array_to_string(relacl,',') ~ 'givenuser/';

Thought there was a thread a short while ago, but couldn't find it. String 
functions can be used to manipulate the acl string.

If it's changed to
  	~'/givenuser'
you will get the list of privs the user gave to others.



Regards,

Ben K.
Developer
http://benix.tamu.edu



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


end of thread, other threads:[~2006-05-07 06:19 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-05-06 12:25 How to list all the privileges a user has? kynn@panix.com
2006-05-07 06:19 ` Ben K. <bkim@coe.tamu.edu>

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