Thanks to Jose Carlos Martinez Llario <jomarlla@cgf.upv.es>
git-svn-id: http://svn.osgeo.org/postgis/trunk@8315
b70326c6-7e19-0410-871a-
916f4a2858ee
IF var_cur_search_path LIKE '%' || quote_ident(a_schema_name) || '%' THEN
var_result := a_schema_name || ' already in database search_path';
ELSE
- EXECUTE 'ALTER DATABASE ' || current_database() || ' SET search_path = ' || var_cur_search_path || ', ' || quote_ident(a_schema_name);
+ EXECUTE 'ALTER DATABASE ' || quote_ident(current_database()) || ' SET search_path = ' || var_cur_search_path || ', ' || quote_ident(a_schema_name);
var_result := a_schema_name || ' has been added to end of database search_path ';
END IF;