[postgis-tickets] r15078 - Fix schema support in RT_CreateOveriew

Sandro Santilli strk at kbt.io
Wed Sep 7 11:15:25 PDT 2016


Author: strk
Date: 2016-09-07 11:15:24 -0700 (Wed, 07 Sep 2016)
New Revision: 15078

Modified:
   trunk/raster/rt_pg/rtpostgis.sql.in
   trunk/raster/test/regress/rt_createoverview.sql
   trunk/raster/test/regress/rt_createoverview_expected
Log:
Fix schema support in RT_CreateOveriew

Patch by hypostase
Closes #3615

Modified: trunk/raster/rt_pg/rtpostgis.sql.in
===================================================================
--- trunk/raster/rt_pg/rtpostgis.sql.in	2016-09-07 17:45:16 UTC (rev 15077)
+++ trunk/raster/rt_pg/rtpostgis.sql.in	2016-09-07 18:15:24 UTC (rev 15078)
@@ -8775,7 +8775,8 @@
   PERFORM  @extschema at .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;
 

Modified: trunk/raster/test/regress/rt_createoverview.sql
===================================================================
--- trunk/raster/test/regress/rt_createoverview.sql	2016-09-07 17:45:16 UTC (rev 15077)
+++ trunk/raster/test/regress/rt_createoverview.sql	2016-09-07 18:15:24 UTC (rev 15078)
@@ -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_4_res1;
 DROP TABLE o_2_res1;
 DROP TABLE res1;
+DROP SCHEMA oschm;
+DISCARD ALL; -- resets change in search_path

Modified: trunk/raster/test/regress/rt_createoverview_expected
===================================================================
--- trunk/raster/test/regress/rt_createoverview_expected	2016-09-07 17:45:16 UTC (rev 15077)
+++ trunk/raster/test/regress/rt_createoverview_expected	2016-09-07 18:15:24 UTC (rev 15078)
@@ -13,3 +13,4 @@
 o_8_res1|r|res1|r|8
 o_16_res1|r|res1|r|16
 count|544|136|36|10|3
+DISCARD ALL



More information about the postgis-tickets mailing list