Re: machine-parseable object descriptions - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: machine-parseable object descriptions
Date
Msg-id 20130320035754.GD3747@alvh.no-ip.org
Whole thread Raw
In response to Re: machine-parseable object descriptions  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
Alvaro Herrera wrote:
> .. and here's the patch.

I forgot an example involving the funniest of all object classes:
default ACLs.  Here it is.

alvherre=# create role rol1;
CREATE ROLE
alvherre=# create role rol2;
CREATE ROLE
alvherre=# create schema rol1 authorization rol1;
CREATE SCHEMA
alvherre=# alter default privileges for role rol1, rol2 grant insert on tables to alvherre;
ALTER DEFAULT PRIVILEGES
alvherre=# alter default privileges for role rol1 in schema rol1 grant insert on tables to alvherre;
ALTER DEFAULT PRIVILEGES
alvherre=# select oid,foo.* from pg_default_acl, lateral (select * from pg_identify_object(tableoid, oid, 0)) foo ; oid
|    type     | schema | name |              identity                
-------+-------------+--------+------+-------------------------------------48839 | default acl |        |      | for
rolerol1 on tables48840 | default acl |        |      | for role rol2 on tables48844 | default acl |        |      |
forrole rol1 in schema rol1 on tables 
(4 filas)

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: machine-parseable object descriptions
Next
From: Daniel Farina
Date:
Subject: Re: postgres_fdw vs data formatting GUCs (was Re: [v9.3] writable foreign tables)