From 54973142f69e28686953df71ba9cf87fe7506e55 Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Mon, 1 Jun 2015 10:37:46 -0700 Subject: [PATCH] Handle "unsupported argument" case for CDB_UserTables in support of #64 --- README.md | 2 +- scripts-available/CDB_UserTables.sql | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ed38bff..5ed529d 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/scripts-available/CDB_UserTables.sql b/scripts-available/CDB_UserTables.sql index 1b211b7..aa82f37 100644 --- a/scripts-available/CDB_UserTables.sql +++ b/scripts-available/CDB_UserTables.sql @@ -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';