Grant permission to run table-info functions to public

This is needed as a way to migrate from versions < 0.2.0
See #36
This commit is contained in:
Sandro Santilli 2014-06-06 11:33:34 +02:00
parent 01ae7b8c10
commit f8180123eb
5 changed files with 16 additions and 4 deletions

7
NEWS
View File

@ -5,9 +5,10 @@ Important changes:
- This release adds dependency on "plpythonu" extension
- Roles are not created anymore, previously private functions
for table information extraction will now be callable by
anyone while only returning information about tables over
which the calling user has SELECT privilege (#36)
for table information extraction (CDB_UserTables, CDB_TableIndexes,
CDB_ColumnNames, CDB_ColumnType) will now be callable by anyone while
only returning information about tables over which the calling user
has SELECT privilege (#36)
Bug fixes:

View File

@ -11,3 +11,6 @@ AS $$
$$ LANGUAGE SQL;
-- This is to migrate from pre-0.2.0 version
-- See http://github.com/CartoDB/cartodb-postgresql/issues/36
GRANT EXECUTE ON FUNCTION CDB_ColumnNames(REGCLASS) TO PUBLIC;

View File

@ -12,3 +12,6 @@ AS $$
$$ LANGUAGE SQL;
-- This is to migrate from pre-0.2.0 version
-- See http://github.com/CartoDB/cartodb-postgresql/issues/36
GRANT EXECUTE ON FUNCTION CDB_ColumnType(REGCLASS, TEXT) TO public;

View File

@ -22,3 +22,6 @@ AS $$
$$ LANGUAGE SQL;
-- This is to migrate from pre-0.2.0 version
-- See http://github.com/CartoDB/cartodb-postgresql/issues/36
GRANT EXECUTE ON FUNCTION CDB_TableIndexes(REGCLASS) TO public;

View File

@ -5,7 +5,6 @@
--
-- Currently accepted permissions are: 'public', 'private' or 'all'
--
-- DROP FUNCTION IF EXISTS CDB_UserTables(); -- replaced by:
CREATE OR REPLACE FUNCTION CDB_UserTables(perm text DEFAULT 'all')
RETURNS SETOF information_schema.sql_identifier
AS $$
@ -37,3 +36,6 @@ AS $$
;
$$ LANGUAGE 'sql';
-- This is to migrate from pre-0.2.0 version
-- See http://github.com/CartoDB/cartodb-postgresql/issues/36
GRANT EXECUTE ON FUNCTION CDB_UserTables(text) TO public;