Re: default privileges - Mailing list pgsql-admin

From Raghavendra
Subject Re: default privileges
Date
Msg-id CA+h6AhhH18ykyhT-1j3AUCmPQrN==td_12n1Avqiw9Vfwa_WGA@mail.gmail.com
Whole thread Raw
In response to default privileges  (Radovan Jablonovsky <radovan.jablonovsky@replicon.com>)
List pgsql-admin


On Thu, Apr 17, 2014 at 9:04 PM, Radovan Jablonovsky <radovan.jablonovsky@replicon.com> wrote:
Metadata Information about assigned "define default access privileges" based on documentation is possible retrieve using psql command "\ddp". I was looking on google an inside system tables, but was not able to figure out where is the information stored (resp how to retrieve it) from system tables/functions.  Could you point to correct direction?

You can find out where that information captured by meta-commands by connecting to psql with "-E"​ option(display queries that internal commands generate)


-bash-4.1$ psql -E
psql.bin (9.3.4)
Type "help" for help.

postgres=# \ddp
********* QUERY **********
SELECT pg_catalog.pg_get_userbyid(d.defaclrole) AS "Owner",
  n.nspname AS "Schema",
  CASE d.defaclobjtype WHEN 'r' THEN 'table' WHEN 'S' THEN 'sequence' WHEN 'f' THEN 'function' WHEN 'T' THEN 'type' END AS "Type",
  pg_catalog.array_to_string(d.defaclacl, E'\n') AS "Access privileges"
FROM pg_catalog.pg_default_acl d
     LEFT JOIN pg_catalog.pg_namespace n ON n.oid = d.defaclnamespace
ORDER BY 1, 2, 3;
**************************

         Default access privileges
 Owner | Schema | Type | Access privileges
-------+--------+------+-------------------
(0 rows)

Hope its clear now from where its getting the details.

---
Regards,
Raghavendra
EnterpriseDB Corporation


 
Sincerely,
--

Radovan Jablonovsky | SaaS DBA | Phone 1-403-262-6519 (ext. 256) | Fax 1-403-233-8046


Replicon | Hassle-Free Time & Expense Management Software - 7,300 Customers - 70 Countries
www.replicon.com | facebook | twitter | blog | contact us

We are hiring! | search jobs


pgsql-admin by date:

Previous
From: Radovan Jablonovsky
Date:
Subject: default privileges
Next
From: Oscar Calderon
Date:
Subject: Difference between fsync and open_sync