Table permessions

From: salah jubeh <s_jubeh(at)yahoo(dot)com>
To: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: Table permessions
Date: 2012-01-18 13:48:46
Message-ID: 1326894526.13821.YahooMailNeo@web161504.mail.bf1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message salah jubeh 2012-01-18 15:34:38 Re: Table permessions - solved
Previous Message Dmitriy Igrishin 2012-01-18 13:17:38 Re: On duplicate ignore