Re: Table permessions - solved - Mailing list pgsql-general

From salah jubeh
Subject Re: Table permessions - solved
Date
Msg-id 1326900878.30100.YahooMailNeo@web161503.mail.bf1.yahoo.com
Whole thread Raw
In response to Table permessions  (salah jubeh <s_jubeh@yahoo.com>)
List pgsql-general
I found this view

information_schema.table_privileges


Regards

 



From: salah jubeh <s_jubeh@yahoo.com>
To: pgsql <pgsql-general@postgresql.org>
Sent: Wednesday, January 18, 2012 2:48 PM
Subject: [GENERAL] Table permessions

Hello,

I have create a table from another table such as

CREATE TABLE tmp_XXX AS SELECT * FROM XXX; 


The  tmp_XXX  tables has no permissions assigned to it and I  want to assign it with the same owner and access privileges  of XXX  table. I had a look on pg catalog tables  http://www.postgresql.org/docs/8.4/static/catalogs.html to create a stored procedure to do this job for me. I have found some tables which might be useful to get the original table iformation. For example, I can use  pg_table to get the owner of the original table.  Also, I have found pg_roles. However, I was not able to find where the access privileges are stored.

Is there a better way to do this task than extracting the access privileges from pg catalog ?  If not, where I can find the access privileges information ?


Thanks in advance



 




pgsql-general by date:

Previous
From: Volodymyr Kostyrko
Date:
Subject: scenario with a slow query
Next
From: Jerry Sievers
Date:
Subject: Re: Redirect ERROR, FATAL and other messages