[postgis-tickets] [SCM] PostGIS branch stable-3.2 updated. 3.2.4-6-g15eaa9e07
git at osgeo.org
git at osgeo.org
Tue Feb 14 22:47:33 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.2 has been updated
via 15eaa9e0799eeed941e9ca8e19545cb4bce1e4e4 (commit)
from 3ac59f7ab56cad9585bafcfb3fd88b50ceebaab7 (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 15eaa9e0799eeed941e9ca8e19545cb4bce1e4e4
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.2.4
diff --git a/NEWS b/NEWS
index 74800dc7a..2e5c5337c 100644
--- a/NEWS
+++ b/NEWS
@@ -10,7 +10,8 @@ Proj 6.1+, and PostgreSQL 14+.
- #5106, Fix segfault in ST_RemEdgeNewFace/ST_RemEdgeModFace
when no edge side-faces are found (Sandro Santilli)
- #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.2.4
2022/11/12
diff --git a/raster/rt_pg/rtpostgis.sql.in b/raster/rt_pg/rtpostgis.sql.in
index 6d1134ebc..ae730c407 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 | 3 ++-
raster/rt_pg/rtpostgis.sql.in | 30 +++++++++++++++---------------
2 files changed, 17 insertions(+), 16 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list