On Thu, Apr 17, 2014 at 9:04 PM, Radovan Jablonovsky <radovan.jablonovsky@xxxxxxxxxxxx> 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.
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 usWe are hiring! | search jobs