]> granicus.if.org Git - postgis/commitdiff
Fix schema support in RT_CreateOveriew
authorSandro Santilli <strk@kbt.io>
Wed, 7 Sep 2016 18:15:24 +0000 (18:15 +0000)
committerSandro Santilli <strk@kbt.io>
Wed, 7 Sep 2016 18:15:24 +0000 (18:15 +0000)
Patch by hypostase
Closes #3615

git-svn-id: http://svn.osgeo.org/postgis/trunk@15078 b70326c6-7e19-0410-871a-916f4a2858ee

raster/rt_pg/rtpostgis.sql.in
raster/test/regress/rt_createoverview.sql
raster/test/regress/rt_createoverview_expected

index a5aba3b61b6da3b31a29ed590e21302814084d09..99d1f5d9bf70793d74b4b29230daa79da3b2023a 100644 (file)
@@ -8775,7 +8775,8 @@ BEGIN
   PERFORM  @extschema@.AddOverviewConstraints(sinfo.sch, ttab, col,
                                  sinfo.sch, sinfo.tab, col, factor);
 
-  RETURN ttab;
+    -- return the schema as well as the table
+  RETURN sinfo.sch||'.'||ttab;
 END;
 $$ LANGUAGE 'plpgsql' VOLATILE STRICT;
 
index 3cc172ca0d394709e3be6f92be5d3195ba9d7650..c73119c34b7ab14f157b47484a56e51e1d244982 100644 (file)
@@ -1,4 +1,7 @@
 SET client_min_messages TO warning;
+
+CREATE SCHEMA oschm;
+SET search_path TO oschm,public;
 CREATE TABLE res1 AS SELECT
   ST_AddBand(
     ST_MakeEmptyRaster(10, 10, x, y, 1, -1, 0, 0, 0)
@@ -52,3 +55,5 @@ DROP TABLE o_8_res1;
 DROP TABLE o_4_res1;
 DROP TABLE o_2_res1;
 DROP TABLE res1;
+DROP SCHEMA oschm;
+DISCARD ALL; -- resets change in search_path
index 7173bcaa536098c6c7b468eb3c6ca6f791136b39..8e2d4ea8ef50e2742929291811d59eee01044028 100644 (file)
@@ -13,3 +13,4 @@ o_4_res1|r|res1|r|4
 o_8_res1|r|res1|r|8
 o_16_res1|r|res1|r|16
 count|544|136|36|10|3
+DISCARD ALL