[postgis-tickets] [SCM] PostGIS branch master updated. 3.4.0rc1-84-g83c9005b4

git at osgeo.org git at osgeo.org
Wed Aug 30 09:11:11 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  83c9005b495cbc1c54facf017db331a8a4d635d7 (commit)
      from  327c3ec729107c2470fb1256fdac8e9c350159c7 (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 83c9005b495cbc1c54facf017db331a8a4d635d7
Author: Sandro Santilli <strk at kbt.io>
Date:   Wed Aug 30 18:10:56 2023 +0200

    Fix upgrade with objects using ST_MapAlgebraFCT
    
    Also adds availability info to the function signatures.
    
    References #5500 in master branch (3.5.0dev)

diff --git a/raster/rt_pg/rtpostgis.sql.in b/raster/rt_pg/rtpostgis.sql.in
index ccb2863eb..2efecbbef 100644
--- a/raster/rt_pg/rtpostgis.sql.in
+++ b/raster/rt_pg/rtpostgis.sql.in
@@ -2349,6 +2349,7 @@ CREATE OR REPLACE FUNCTION st_mapalgebraexpr(rast raster, pixeltype text, expres
     LANGUAGE 'sql' IMMUTABLE PARALLEL SAFE;
 
 -- All arguments supplied, use the C implementation.
+-- Availability: 2.0.0
 CREATE OR REPLACE FUNCTION st_mapalgebrafct(rast raster, band integer,
         pixeltype text, onerastuserfunc regprocedure, variadic args text[])
     RETURNS raster
@@ -2356,6 +2357,7 @@ CREATE OR REPLACE FUNCTION st_mapalgebrafct(rast raster, band integer,
     LANGUAGE 'c' IMMUTABLE PARALLEL SAFE;
 
 -- Variant 1: missing user args
+-- Availability: 2.0.0
 CREATE OR REPLACE FUNCTION st_mapalgebrafct(rast raster, band integer,
         pixeltype text, onerastuserfunc regprocedure)
     RETURNS raster
@@ -2363,6 +2365,7 @@ CREATE OR REPLACE FUNCTION st_mapalgebrafct(rast raster, band integer,
     LANGUAGE 'sql' IMMUTABLE PARALLEL SAFE;
 
 -- Variant 2: missing pixeltype; default to pixeltype of rast
+-- Availability: 2.0.0
 CREATE OR REPLACE FUNCTION st_mapalgebrafct(rast raster, band integer,
         onerastuserfunc regprocedure, variadic args text[])
     RETURNS raster
@@ -2370,6 +2373,7 @@ CREATE OR REPLACE FUNCTION st_mapalgebrafct(rast raster, band integer,
     LANGUAGE 'sql' IMMUTABLE PARALLEL SAFE;
 
 -- Variant 3: missing pixeltype and user args; default to pixeltype of rast
+-- Availability: 2.0.0
 CREATE OR REPLACE FUNCTION st_mapalgebrafct(rast raster, band integer,
         onerastuserfunc regprocedure)
     RETURNS raster
@@ -2377,6 +2381,7 @@ CREATE OR REPLACE FUNCTION st_mapalgebrafct(rast raster, band integer,
     LANGUAGE 'sql' IMMUTABLE PARALLEL SAFE;
 
 -- Variant 4: missing band; default to band 1
+-- Availability: 2.0.0
 CREATE OR REPLACE FUNCTION st_mapalgebrafct(rast raster, pixeltype text,
         onerastuserfunc regprocedure, variadic args text[])
     RETURNS raster
@@ -2384,6 +2389,7 @@ CREATE OR REPLACE FUNCTION st_mapalgebrafct(rast raster, pixeltype text,
     LANGUAGE 'sql' IMMUTABLE PARALLEL SAFE;
 
 -- Variant 5: missing band and user args; default to band 1
+-- Availability: 2.0.0
 CREATE OR REPLACE FUNCTION st_mapalgebrafct(rast raster, pixeltype text,
         onerastuserfunc regprocedure)
     RETURNS raster
@@ -2391,6 +2397,7 @@ CREATE OR REPLACE FUNCTION st_mapalgebrafct(rast raster, pixeltype text,
     LANGUAGE 'sql' IMMUTABLE PARALLEL SAFE;
 
 -- Variant 6: missing band, and pixeltype; default to band 1, pixeltype of rast.
+-- Availability: 2.0.0
 CREATE OR REPLACE FUNCTION st_mapalgebrafct(rast raster, onerastuserfunc regprocedure,
         variadic args text[])
     RETURNS raster
@@ -2398,6 +2405,7 @@ CREATE OR REPLACE FUNCTION st_mapalgebrafct(rast raster, onerastuserfunc regproc
     LANGUAGE 'sql' IMMUTABLE PARALLEL SAFE;
 
 -- Variant 7: missing band, pixeltype, and user args; default to band 1, pixeltype of rast.
+-- Availability: 2.0.0
 CREATE OR REPLACE FUNCTION st_mapalgebrafct(rast raster, onerastuserfunc regprocedure)
     RETURNS raster
     AS $$ SELECT @extschema at .ST_mapalgebrafct($1, 1, NULL, $2, NULL) $$
@@ -2430,6 +2438,7 @@ CREATE OR REPLACE FUNCTION st_mapalgebraexpr(
 	AS $$ SELECT @extschema at .ST_mapalgebraexpr($1, 1, $2, 1, $3, $4, $5, $6, $7, $8) $$
 	LANGUAGE 'sql' IMMUTABLE PARALLEL SAFE;
 
+-- Availability: 2.0.0
 CREATE OR REPLACE FUNCTION st_mapalgebrafct(
 	rast1 raster, band1 integer,
 	rast2 raster, band2 integer,
@@ -2441,11 +2450,13 @@ CREATE OR REPLACE FUNCTION st_mapalgebrafct(
 	AS 'MODULE_PATHNAME', 'RASTER_mapAlgebra2'
 	LANGUAGE 'c' IMMUTABLE PARALLEL SAFE;
 
+-- Availability: 2.0.0
 CREATE OR REPLACE FUNCTION st_mapalgebrafct(
 	rast1 raster,
 	rast2 raster,
 	tworastuserfunc regprocedure,
-	pixeltype text DEFAULT NULL, extenttype text DEFAULT 'INTERSECTION',
+	pixeltype text DEFAULT NULL,
+	extenttype text DEFAULT 'INTERSECTION',
 	VARIADIC userargs text[] DEFAULT NULL
 )
 	RETURNS raster
diff --git a/raster/rt_pg/rtpostgis_drop.sql.in b/raster/rt_pg/rtpostgis_drop.sql.in
index ad5cdf537..ea65700d5 100644
--- a/raster/rt_pg/rtpostgis_drop.sql.in
+++ b/raster/rt_pg/rtpostgis_drop.sql.in
@@ -76,6 +76,8 @@ 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);
 
+-- Never made it into 2.0.0, see https://trac.osgeo.org/postgis/ticket/5500
+DROP FUNCTION IF EXISTS  ST_MapAlgebraFct(raster, raster, regprocedure, VARIADIC text[]);
 -- Removed in 2.1.0
 DROP FUNCTION IF EXISTS _st_mapalgebra4unionfinal1(raster);
 -- Removed in 2.1.0
diff --git a/raster/rt_pg/rtpostgis_upgrade_cleanup.sql.in b/raster/rt_pg/rtpostgis_upgrade_cleanup.sql.in
index 0b32f5b13..ee0e1b549 100644
--- a/raster/rt_pg/rtpostgis_upgrade_cleanup.sql.in
+++ b/raster/rt_pg/rtpostgis_upgrade_cleanup.sql.in
@@ -147,22 +147,8 @@ DROP FUNCTION IF EXISTS ST_MapAlgebra(raster, pixeltype text, expression text, n
 --signatures or arg names changed
 DROP FUNCTION IF EXISTS ST_MapAlgebraExpr(raster, integer, text, text, text);
 DROP FUNCTION IF EXISTS ST_MapAlgebraExpr(raster, text, text, text);
-DROP FUNCTION IF EXISTS ST_MapalgebraFct(raster, regprocedure);
-DROP FUNCTION IF EXISTS ST_MapAlgebraFct(raster, text, regprocedure, VARIADIC text[]);
-DROP FUNCTION IF EXISTS ST_MapAlgebraFct(raster, text, regprocedure);
-DROP FUNCTION IF EXISTS ST_MapAlgebraFct(raster, regprocedure, VARIADIC text[]);
-DROP FUNCTION IF EXISTS ST_MapAlgebraFct(raster, integer, regprocedure, variadic text[]);
-DROP FUNCTION IF EXISTS ST_MapAlgebraFct(raster, integer, text, regprocedure, VARIADIC text[]);
-DROP FUNCTION IF EXISTS ST_MapAlgebraFct(raster, integer, text, regprocedure);
-DROP FUNCTION IF EXISTS ST_MapAlgebraFct(raster, integer, regprocedure, variadic text[]);
-DROP FUNCTION IF EXISTS ST_MapalgebraFct(raster, integer, regprocedure);
-DROP FUNCTION IF EXISTS ST_MapAlgebraFct(raster, raster, regprocedure, text, text, VARIADIC text[]);
-DROP FUNCTION IF EXISTS ST_MapAlgebraFct(raster, integer, raster, integer, regprocedure, text, text, VARIADIC text[]);
 DROP FUNCTION IF EXISTS ST_MapAlgebraFctNgb(raster, integer, text, integer, integer, regprocedure, text,  VARIADIC text[]);
 
---dropped functions
-DROP FUNCTION IF EXISTS  ST_MapAlgebraFct(raster, raster, regprocedure, VARIADIC text[]);
-
 --added extra parameter so these are obsolete --
 DROP FUNCTION IF EXISTS ST_AsRaster(geometry , integer , integer , double precision , double precision , text , double precision , double precision , double precision , double precision );
 DROP FUNCTION IF EXISTS ST_AsRaster(geometry , integer , integer , text[] , double precision[] , double precision[] , double precision , double precision , double precision , double precision );

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

Summary of changes:
 raster/rt_pg/rtpostgis.sql.in                 | 13 ++++++++++++-
 raster/rt_pg/rtpostgis_drop.sql.in            |  2 ++
 raster/rt_pg/rtpostgis_upgrade_cleanup.sql.in | 14 --------------
 3 files changed, 14 insertions(+), 15 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list