From afcc2498c822166ddd83d49290d7073cd198a390 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Wed, 11 Jun 2014 16:27:11 +0200 Subject: [PATCH] List plpythonu requirement first, so get pg_catalog scanned before public 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. --- NEWS | 1 + cartodb.control.in | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index caca6d7..497d9b1 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,7 @@ Enhancements: - Do not force re-cartodbfication on CREATE FROM unpackaged - Drop useless DEFAULT specification in plpgsql variable declarations + - List plpythonu requirement first, so get pg_catalog scanned before public 0.2.0 - 2014-06-09 ------------------ diff --git a/cartodb.control.in b/cartodb.control.in index 3d783c7..c331343 100644 --- a/cartodb.control.in +++ b/cartodb.control.in @@ -3,4 +3,4 @@ comment = 'Turn a database into a cartodb user database.' superuser = true relocatable = false schema = cartodb -requires = 'schema_triggers, postgis, plpythonu' +requires = 'plpythonu, schema_triggers, postgis'