Hello,


Is there a query out there where I can get a list of permissions associated to 
a schema?
Something like the below query that I can do for a table, but for a schema 
instead?

SELECT grantee, privilege_type FROM information_schema.role_table_grants
                  WHERE table_name='sites' order by grantee, privilege_type;

I'm not seeing anything on the net or anything useful in information_schema 
like a
'role_schema_grants' view, and it doesn't appear I can do a \dp on a schema.
Nor the query psql uses for \dp on a table doesn't seem to have a nice way to
convert it to a schema permissions list.  The secret is escaping me. :(

-ds


Background: -----------------

In pg_log, I'm seeing an error I'd like to clean up.

2013-08-15 13:00:32 GMT ERROR:  permission denied for schema public at 
character 98
2013-08-15 13:00:32 GMT STATEMENT: select s.id, s.name, s.activate_at, s.old_sitecode, s.latitude, s.longitude, s.elevation from public.site s where new_schoolid = $1

I get this error on a development system that is a spin off of a production 
system.  The production system doesn't ever produce this
error. Doing a \dp between production and development the sites table shows no difference. I'd like to do the same for the public schema. The public schema by default is open to all imho, and by explicitly opening it up ( to who I don't know) I may be just removing a symptom.. but not the real problem.



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to