[postgis-tickets] [SCM] PostGIS branch stable-3.3 updated. 3.3.2-20-g590002088

git at osgeo.org git at osgeo.org
Tue Feb 14 22:36:51 PST 2023


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, stable-3.3 has been updated
       via  5900020882593ab0c35ca7e421fd4f89400746df (commit)
       via  38761da783763d77b812c54f7af210a9de0f05f9 (commit)
      from  032d7378c123505d0865af9d63203767e923984a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5900020882593ab0c35ca7e421fd4f89400746df
Author: Regina Obe <lr at pcorp.us>
Date:   Wed Feb 15 01:36:01 2023 -0500

     Schema qualify raster functions used in
     raster check constraint functions.
     References #5338 for PostGIS 3.3.3

diff --git a/NEWS b/NEWS
index 6bab1cbf1..597f2013f 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,8 @@ YYYY/MM/DD
   - #5329, Fix downgrade protection introduced in 3.3.0 (Sandro Santilli)
   - #5332, Keep proj errors from percolating into PgSQL log (Paul Ramsey)
   - #5313, Fix memory access issue in ST_InterpolateRaster (Paul Ramsey)
+  - #5338, Dump/Restore of raster table fails on
+           enforce_coverage_tile_rast constraint (Regina Obe)
 
 
 PostGIS 3.3.2

commit 38761da783763d77b812c54f7af210a9de0f05f9
Author: Regina Obe <lr at pcorp.us>
Date:   Wed Feb 15 01:13:13 2023 -0500

    Schema qualify raster functions used in raster check constraint
    functions.
    
    References #5338 for PostGIS 3.4.0dev

diff --git a/raster/rt_pg/rtpostgis.sql.in b/raster/rt_pg/rtpostgis.sql.in
index 7330e065a..a7099e35d 100644
--- a/raster/rt_pg/rtpostgis.sql.in
+++ b/raster/rt_pg/rtpostgis.sql.in
@@ -5811,7 +5811,7 @@ CREATE OR REPLACE FUNCTION st_samealignment(
 	ulx2 double precision, uly2 double precision, scalex2 double precision, scaley2 double precision, skewx2 double precision, skewy2 double precision
 )
 	RETURNS boolean
-	AS $$ SELECT st_samealignment(st_makeemptyraster(1, 1, $1, $2, $3, $4, $5, $6), st_makeemptyraster(1, 1, $7, $8, $9, $10, $11, $12)) $$
+	AS $$ SELECT @extschema at .st_samealignment(@extschema at .st_makeemptyraster(1, 1, $1, $2, $3, $4, $5, $6), @extschema at .st_makeemptyraster(1, 1, $7, $8, $9, $10, $11, $12)) $$
 	LANGUAGE 'sql' IMMUTABLE STRICT PARALLEL SAFE;
 
 -- Availability: 2.1.0
@@ -5835,11 +5835,11 @@ CREATE OR REPLACE FUNCTION _st_samealignment_transfn(agg agg_samealignment, rast
 			agg.aligned := NULL;
 		ELSE
 			IF agg.refraster IS NULL THEN
-				m := ST_Metadata(rast);
-				agg.refraster := ST_MakeEmptyRaster(1, 1, m.upperleftx, m.upperlefty, m.scalex, m.scaley, m.skewx, m.skewy, m.srid);
+				m := @extschema at .ST_Metadata(rast);
+				agg.refraster := @extschema at .ST_MakeEmptyRaster(1, 1, m.upperleftx, m.upperlefty, m.scalex, m.scaley, m.skewx, m.skewy, m.srid);
 				agg.aligned := TRUE;
 			ELSIF agg.aligned IS TRUE THEN
-				agg.aligned := ST_SameAlignment(agg.refraster, rast);
+				agg.aligned := @extschema at .ST_SameAlignment(agg.refraster, rast);
 			END IF;
 		END IF;
 		RETURN agg;
@@ -5884,16 +5884,16 @@ CREATE OR REPLACE FUNCTION st_iscoveragetile(rast raster, coverage raster, tilew
 		tile integer[];
 		edge integer[];
 	BEGIN
-		IF NOT ST_SameAlignment(rast, coverage) THEN
+		IF NOT @extschema at .ST_SameAlignment(rast, coverage) THEN
 			RAISE NOTICE 'Raster and coverage are not aligned';
 			RETURN FALSE;
 		END IF;
 
-		_rastmeta := ST_Metadata(rast);
-		_covmeta := ST_Metadata(coverage);
+		_rastmeta := @extschema at .ST_Metadata(rast);
+		_covmeta := @extschema at .ST_Metadata(coverage);
 
 		-- get coverage grid coordinates of upper-left of rast
-		cr := ST_WorldToRasterCoord(coverage, _rastmeta.upperleftx, _rastmeta.upperlefty);
+		cr := @extschema at .ST_WorldToRasterCoord(coverage, _rastmeta.upperleftx, _rastmeta.upperlefty);
 
 		-- rast is not part of coverage
 		IF
@@ -6846,7 +6846,7 @@ CREATE OR REPLACE FUNCTION _add_raster_constraint_srid(rastschema name, rasttabl
 
 		sql := 'ALTER TABLE ' || fqtn
 			|| ' ADD CONSTRAINT ' || quote_ident(cn)
-			|| ' CHECK (st_srid('
+			|| ' CHECK (@extschema at .st_srid('
 			|| quote_ident($3)
 			|| ') = ' || attr || ')';
 
@@ -6931,7 +6931,7 @@ CREATE OR REPLACE FUNCTION _add_raster_constraint_scale(rastschema name, rasttab
 
 		sql := 'ALTER TABLE ' || fqtn
 			|| ' ADD CONSTRAINT ' || quote_ident(cn)
-			|| ' CHECK (round(st_scale' || $4 || '('
+			|| ' CHECK (round(@extschema at .st_scale' || $4 || '('
 			|| quote_ident($3)
 			|| ')::numeric, 10) = round(' || text(attr) || '::numeric, 10))';
 		RETURN  @extschema at ._add_raster_constraint(cn, sql);
@@ -7159,7 +7159,7 @@ CREATE OR REPLACE FUNCTION _add_raster_constraint_alignment(rastschema name, ras
 
 		sql := 'ALTER TABLE ' || fqtn ||
 			' ADD CONSTRAINT ' || quote_ident(cn) ||
-			' CHECK (st_samealignment(' || quote_ident($3) || ', ''' || attr || '''::raster))';
+			' CHECK (@extschema at .st_samealignment(' || quote_ident($3) || ', ''' || attr || '''::raster))';
 		RETURN  @extschema at ._add_raster_constraint(cn, sql);
 	END;
 	$$ LANGUAGE 'plpgsql' VOLATILE STRICT
@@ -7321,7 +7321,7 @@ CREATE OR REPLACE FUNCTION _add_raster_constraint_coverage_tile(rastschema name,
 
 		sql := 'ALTER TABLE ' || fqtn ||
 			' ADD CONSTRAINT ' || quote_ident(cn) ||
-			' CHECK (st_iscoveragetile(' || quote_ident($3) || ', ''' || _covrast || '''::raster, ' || _tilewidth || ', ' || _tileheight || '))';
+			' CHECK (@extschema at .st_iscoveragetile(' || quote_ident($3) || ', ''' || _covrast || '''::raster, ' || _tilewidth || ', ' || _tileheight || '))';
 		RETURN  @extschema at ._add_raster_constraint(cn, sql);
 	END;
 	$$ LANGUAGE 'plpgsql' VOLATILE STRICT
@@ -7453,7 +7453,7 @@ CREATE OR REPLACE FUNCTION _raster_constraint_info_pixel_types(rastschema name,
 
 CREATE OR REPLACE FUNCTION _raster_constraint_pixel_types(rast raster)
 	RETURNS text[] AS
-	$$ SELECT array_agg(pixeltype)::text[] FROM  @extschema at .ST_BandMetaData($1, ARRAY[]::int[]); $$
+	$$ SELECT pg_catalog.array_agg(pixeltype)::text[] FROM  @extschema at .ST_BandMetaData($1, ARRAY[]::int[]); $$
 	LANGUAGE 'sql' STABLE STRICT;
 
 CREATE OR REPLACE FUNCTION _add_raster_constraint_pixel_types(rastschema name, rasttable name, rastcolumn name)
@@ -7541,7 +7541,7 @@ CREATE OR REPLACE FUNCTION _raster_constraint_info_nodata_values(rastschema name
 -- Changed: 2.2.0
 CREATE OR REPLACE FUNCTION _raster_constraint_nodata_values(rast raster)
 	RETURNS numeric[] AS
-	$$ SELECT array_agg(round(nodatavalue::numeric, 10))::numeric[] FROM @extschema at .ST_BandMetaData($1, ARRAY[]::int[]); $$
+	$$ SELECT pg_catalog.array_agg(pg_catalog.round(nodatavalue::numeric, 10))::numeric[] FROM @extschema at .ST_BandMetaData($1, ARRAY[]::int[]); $$
 	LANGUAGE 'sql' IMMUTABLE STRICT PARALLEL SAFE;
 
 CREATE OR REPLACE FUNCTION _add_raster_constraint_nodata_values(rastschema name, rasttable name, rastcolumn name)
@@ -7632,7 +7632,7 @@ CREATE OR REPLACE FUNCTION _raster_constraint_info_out_db(rastschema name, rastt
 
 CREATE OR REPLACE FUNCTION _raster_constraint_out_db(rast raster)
 	RETURNS boolean[] AS
-	$$ SELECT array_agg(isoutdb)::boolean[] FROM @extschema at .ST_BandMetaData($1, ARRAY[]::int[]); $$
+	$$ SELECT pg_catalog.array_agg(isoutdb)::boolean[] FROM @extschema at .ST_BandMetaData($1, ARRAY[]::int[]); $$
 	LANGUAGE 'sql' IMMUTABLE STRICT PARALLEL SAFE;
 
 CREATE OR REPLACE FUNCTION _add_raster_constraint_out_db(rastschema name, rasttable name, rastcolumn name)

-----------------------------------------------------------------------

Summary of changes:
 NEWS                          |  2 ++
 raster/rt_pg/rtpostgis.sql.in | 30 +++++++++++++++---------------
 2 files changed, 17 insertions(+), 15 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list