From: Ben K. <bkim@coe.tamu.edu>
To: kynn@panix.com
Cc: pgsql-admin@postgresql.org
Subject: Re: How to list all the privileges a user has?
Date: Sun, 7 May 2006 01:19:06 -0500 (CDT)
Message-ID: <Pine.GSO.4.64.0605070112490.25732@coe.tamu.edu> (raw)
In-Reply-To: <200605061225.k46CPhM12142@panix3.panix.com>
References: <200605061225.k46CPhM12142@panix3.panix.com>
> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: bkim@coe.tamu.edu, kynn@panix.com
Subject: Re: How to list all the privileges a user has?
In-Reply-To: <Pine.GSO.4.64.0605070112490.25732@coe.tamu.edu>
References: <200605061225.k46CPhM12142@panix3.panix.com> <Pine.GSO.4.64.0605070112490.25732@coe.tamu.edu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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