Re: How to find out about user rights - Mailing list pgsql-novice

From Tom Lane
Subject Re: How to find out about user rights
Date
Msg-id 24609.1352390189@sss.pgh.pa.us
Whole thread Raw
In response to How to find out about user rights  (Sauer Annegret <sauer@Verwaltung.uni-hohenheim.de>)
Responses Re: How to find out about user rights
List pgsql-novice
Sauer Annegret <sauer@Verwaltung.uni-hohenheim.de> writes:
> Is it possible to get a list of all tables within a database for which a certain user has rights? Of course, I could
lookthrough the table list in pgAdmin - but maybe there is something easier?  

You could look into the information_schema views, or you could write a
query using the has_table_privilege() function.

> Or - another question - how could you possibly copy the rights of a certain user and assign them to another user?

There's no mechanism for doing that.  Usually the recommended solution
for "sharing" rights is to assign the rights to a role created for the
purpose, and then to grant use of that role to the individual users.
However this approach requires a bit of foresight ...

            regards, tom lane


pgsql-novice by date:

Previous
From: Sauer Annegret
Date:
Subject: How to find out about user rights
Next
From: Sauer Annegret
Date:
Subject: Re: How to find out about user rights