[postgis-tickets] [SCM] PostGIS branch master updated. 3.4.0rc1-65-g197a187f2
git at osgeo.org
git at osgeo.org
Tue Aug 29 03:01:14 PDT 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, master has been updated
via 197a187f242466aa579b052b0afa553ff42fb7d7 (commit)
from 3ecd48c7fa8c97142e00fd4e5467ca22223a0f93 (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 197a187f242466aa579b052b0afa553ff42fb7d7
Author: Sandro Santilli <strk at kbt.io>
Date: Mon Aug 28 23:58:16 2023 +0200
Fix upgrades in presence of views using st_aspect(..raster..)
Adds functions availability info
References #5491 in master branch (3.5.0dev)
diff --git a/raster/rt_pg/rtpostgis.sql.in b/raster/rt_pg/rtpostgis.sql.in
index e30389607..ccb2863eb 100644
--- a/raster/rt_pg/rtpostgis.sql.in
+++ b/raster/rt_pg/rtpostgis.sql.in
@@ -3549,6 +3549,7 @@ CREATE OR REPLACE FUNCTION st_slope(
-- http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=How%20Hillshade%20works
-----------------------------------------------------------------------
+-- Availability: 2.1.0
CREATE OR REPLACE FUNCTION _st_aspect4ma(value double precision[][][], pos integer[][], VARIADIC userargs text[] DEFAULT NULL)
RETURNS double precision
AS $$
@@ -3658,10 +3659,13 @@ CREATE OR REPLACE FUNCTION _st_aspect4ma(value double precision[][][], pos integ
END;
$$ LANGUAGE 'plpgsql' IMMUTABLE PARALLEL SAFE;
+-- Availability: 2.1.0
CREATE OR REPLACE FUNCTION st_aspect(
- rast raster, nband integer,
+ rast raster,
+ nband integer,
customextent raster,
- pixeltype text DEFAULT '32BF', units text DEFAULT 'DEGREES',
+ pixeltype text DEFAULT '32BF',
+ units text DEFAULT 'DEGREES',
interpolate_nodata boolean DEFAULT FALSE
)
RETURNS raster
@@ -3713,9 +3717,14 @@ CREATE OR REPLACE FUNCTION st_aspect(
END;
$$ LANGUAGE 'plpgsql' IMMUTABLE PARALLEL SAFE;
+-- Availability: 2.0.0
+-- Changed: 2.1.0 changed nband parameter name, added units, interpolate_nodata and defaults
+-- Replaces st_aspect(raster, integer, text) deprecated in 2.1.0
CREATE OR REPLACE FUNCTION st_aspect(
- rast raster, nband integer DEFAULT 1,
- pixeltype text DEFAULT '32BF', units text DEFAULT 'DEGREES',
+ rast raster,
+ nband integer DEFAULT 1,
+ pixeltype text DEFAULT '32BF',
+ units text DEFAULT 'DEGREES',
interpolate_nodata boolean DEFAULT FALSE
)
RETURNS raster
diff --git a/raster/rt_pg/rtpostgis_drop.sql.in b/raster/rt_pg/rtpostgis_drop.sql.in
index 72c4e085d..ad5cdf537 100644
--- a/raster/rt_pg/rtpostgis_drop.sql.in
+++ b/raster/rt_pg/rtpostgis_drop.sql.in
@@ -68,6 +68,11 @@ DROP FUNCTION IF EXISTS _st_slope4ma(float8[], text, text[]);
-- Removed in 2.0.0 ? see ticket #5490
DROP FUNCTION IF EXISTS st_slope(raster, integer, text, boolean);
+-- Removed in 2.1.0, see ticket #5491
+DROP FUNCTION IF EXISTS _st_aspect4ma(float8[], text, text[]);
+-- Removed before 2.0.0 ? see ticket #5491
+DROP FUNCTION IF EXISTS st_aspect(raster, integer, text, boolean);
+
DROP FUNCTION IF EXISTS ST_Intersection(raster,raster, integer, integer);
DROP FUNCTION IF EXISTS ST_Intersection(geometry,raster);
diff --git a/raster/rt_pg/rtpostgis_upgrade_cleanup.sql.in b/raster/rt_pg/rtpostgis_upgrade_cleanup.sql.in
index d08f34b59..0b32f5b13 100644
--- a/raster/rt_pg/rtpostgis_upgrade_cleanup.sql.in
+++ b/raster/rt_pg/rtpostgis_upgrade_cleanup.sql.in
@@ -511,9 +511,7 @@ DROP FUNCTION IF EXISTS _st_contains(geometry, raster, integer);
DROP FUNCTION IF EXISTS st_addband(raster, raster[], integer);
-- function signatures changed
-DROP FUNCTION IF EXISTS st_aspect(raster, integer, text, text, boolean);
-DROP FUNCTION IF EXISTS st_aspect(raster, integer, text, boolean);
-DROP FUNCTION IF EXISTS st_aspect(raster, integer, text);
+--DROP FUNCTION IF EXISTS st_aspect(raster, integer, text, text, boolean); --- sig2, not changed since 2.1.0, see ticket #5491
DROP FUNCTION IF EXISTS st_hillshade(raster, integer, text, double precision, double precision, double precision, double precision, boolean);
DROP FUNCTION IF EXISTS st_hillshade(raster, integer, text, float, float, float, float, boolean);
DROP FUNCTION IF EXISTS st_hillshade(raster, integer, text, float, float, float, float);
@@ -562,7 +560,6 @@ DROP FUNCTION IF EXISTS _add_raster_constraint_regular_blocking(name, name, name
-- function signature changed
DROP FUNCTION IF EXISTS st_asbinary(raster);
-DROP FUNCTION IF EXISTS _st_aspect4ma(float8[], text, text[]);
DROP FUNCTION IF EXISTS _st_hillshade4ma(float8[], text, text[]);
-- function signature changed
diff --git a/raster/test/regress/hooks/hook-after-upgrade-raster.sql b/raster/test/regress/hooks/hook-after-upgrade-raster.sql
index 950bf3631..59f57a7cc 100644
--- a/raster/test/regress/hooks/hook-after-upgrade-raster.sql
+++ b/raster/test/regress/hooks/hook-after-upgrade-raster.sql
@@ -6,6 +6,7 @@ DROP TABLE upgrade_test_raster;
DROP TABLE upgrade_test_raster_with_regular_blocking;
DROP VIEW upgrade_test_raster_view_st_slope;
+DROP VIEW upgrade_test_raster_view_st_aspect;
-- Drop functions deprecated on upgrade
DROP FUNCTION IF EXISTS st_value_deprecated_by_postgis_201(raster,geometry,boolean);
diff --git a/raster/test/regress/hooks/hook-before-upgrade-raster.sql b/raster/test/regress/hooks/hook-before-upgrade-raster.sql
index 92d64879b..58a6a1bc6 100644
--- a/raster/test/regress/hooks/hook-before-upgrade-raster.sql
+++ b/raster/test/regress/hooks/hook-before-upgrade-raster.sql
@@ -66,3 +66,9 @@ CREATE VIEW upgrade_test_raster_view_st_slope AS
SELECT
st_slope(NULL::raster, NULL::int, NULL::raster) sig1,
st_slope(NULL::raster, NULL::int) sig2;
+
+-- See https://trac.osgeo.org/postgis/ticket/5491
+CREATE VIEW upgrade_test_raster_view_st_aspect AS
+SELECT
+ st_aspect(NULL::raster, NULL::int, NULL::raster) sig1,
+ st_aspect(NULL::raster) sig2;
-----------------------------------------------------------------------
Summary of changes:
raster/rt_pg/rtpostgis.sql.in | 17 +++++++++++++----
raster/rt_pg/rtpostgis_drop.sql.in | 5 +++++
raster/rt_pg/rtpostgis_upgrade_cleanup.sql.in | 5 +----
raster/test/regress/hooks/hook-after-upgrade-raster.sql | 1 +
.../test/regress/hooks/hook-before-upgrade-raster.sql | 6 ++++++
5 files changed, 26 insertions(+), 8 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list