]> granicus.if.org Git - postgis/commitdiff
topology.AddToSearchPath: quote database identifier.
authorSandro Santilli <strk@keybit.net>
Thu, 8 Dec 2011 08:07:58 +0000 (08:07 +0000)
committerSandro Santilli <strk@keybit.net>
Thu, 8 Dec 2011 08:07:58 +0000 (08:07 +0000)
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

topology/sql/manage/ManageHelper.sql

index e1612ee7dec3e79d343b5f801cf009db5e08ca33..39150df7740742c485315a906470eb677f61c9b4 100644 (file)
@@ -29,7 +29,7 @@ BEGIN
        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;