X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id D8A989FA42A for ; Sun, 7 May 2006 03:19:34 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 53307-04 for ; Sun, 7 May 2006 03:19:30 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from coe.tamu.edu (edsun.coe.tamu.edu [165.91.232.6]) by postgresql.org (Postfix) with ESMTP id 9D0B19FA32D for ; Sun, 7 May 2006 03:19:30 -0300 (ADT) Received: from coe.tamu.edu (coe.tamu.edu [165.91.232.6]) by coe.tamu.edu (8.11.7p2+Sun/8.12.11) with ESMTP id k476J6q26309; Sun, 7 May 2006 01:19:08 -0500 (CDT) Date: Sun, 7 May 2006 01:19:06 -0500 (CDT) From: "Ben K." To: kynn@panix.com cc: pgsql-admin@postgresql.org Subject: Re: How to list all the privileges a user has? In-Reply-To: <200605061225.k46CPhM12142@panix3.panix.com> Message-ID: References: <200605061225.k46CPhM12142@panix3.panix.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/64 X-Sequence-Number: 21596 > 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