Handle "unsupported argument" case for CDB_UserTables

in support of #64
This commit is contained in:
Paul Ramsey 2015-06-01 10:37:46 -07:00
parent ba521461fe
commit 54973142f6
2 changed files with 3 additions and 2 deletions

View File

@ -11,7 +11,7 @@ See https://github.com/CartoDB/cartodb/wiki/CartoDB-PostgreSQL-extension
Dependencies
------------
* PostgreSQL 9.3+ (with plpythonu extension)
* PostgreSQL 9.3+ (with plpythonu extension and xml support)
* [PostGIS extension](http://postgis.net)
* [Schema triggers extension]
(https://bitbucket.org/malloclabs/pg_schema_triggers)

View File

@ -20,7 +20,8 @@ AND n.nspname NOT IN ('pg_catalog', 'information_schema')
AND CASE WHEN perm = 'public' THEN has_table_privilege('public', c.oid, 'SELECT')
WHEN perm = 'private' THEN has_table_privilege(c.oid, 'SELECT') AND NOT
has_table_privilege('public', c.oid, 'SELECT')
ELSE has_table_privilege(c.oid, 'SELECT') END;
WHEN perm = 'all' THEN has_table_privilege(c.oid, 'SELECT')
ELSE false END;
$$ LANGUAGE 'sql';