added tests for usertables to check private tables are not returned

This commit is contained in:
javi 2015-07-27 10:25:44 +02:00
parent 565046c3d4
commit e05613d5c4
2 changed files with 10 additions and 0 deletions

View File

@ -8,6 +8,12 @@ SELECT 'all',CDB_UserTables('all') ORDER BY 2;
SELECT 'public',CDB_UserTables('public') ORDER BY 2;
SELECT 'private',CDB_UserTables('private') ORDER BY 2;
SELECT '--unsupported--',CDB_UserTables('--unsupported--') ORDER BY 2;
-- now tests with public user
\c contrib_regression publicuser
SELECT 'all_publicuser',CDB_UserTables('all') ORDER BY 2;
SELECT 'public_publicuser',CDB_UserTables('public') ORDER BY 2;
SELECT 'private_publicuser',CDB_UserTables('private') ORDER BY 2;
\c contrib_regression postgres
DROP TABLE pub;
DROP TABLE prv;
DROP ROLE publicuser;

View File

@ -9,6 +9,10 @@ all|prv
all|pub
public|pub
private|prv
You are now connected to database "contrib_regression" as user "publicuser"
all_publicuser|pub
public_publicuser|pub
You are now connected to database "contrib_regression" as user "postgres"
DROP TABLE
DROP TABLE
DROP ROLE