Since "plpythonu" is installed in "pg_catalog" schema, requiring it
from cartodb.control adds the "pg_catalog" to the search_path.
Schemas are added to search_path in order of appearence in the "requires"
directive of the cartodb.contorl, right after the name of schema
written in the "schema" directive.
So this commit changes the resulting search_path from:
cartodb,schema_triggers,public,pg_catalog
To:
cartodb,pg_catalog,schema_triggers,public
Preventing presence of objects in the "public" schema from changing
interpretation of function signatures and body from this extension.
Spotted in the real world in presence of a "date" table changing
intepretation of CDB_StringToDate function.
Roles are not created anymore, previously private functions 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.
Closes#36
This fix was already present at one point in cartodb/lib/sql
(where the code was copied from) but in a different branch than
the one the code was initially copied from.
The fix depends on plpython language which becomes a new dependency.