[postgis-tickets] r15412 - Mark all raster aggregate functions as parallel safe.

Regina Obe lr at pcorp.us
Mon May 29 11:07:55 PDT 2017


Author: robe
Date: 2017-05-29 11:07:55 -0700 (Mon, 29 May 2017)
New Revision: 15412

Modified:
   trunk/raster/rt_pg/rtpostgis.sql.in
Log:
Mark all raster aggregate functions as parallel safe. 
Also more schema qualification, still a lot not schema qualified
flip ST_Intersection to be immutable parallel safe
references #3752 for PostGIS 2.4 (trunk)

Modified: trunk/raster/rt_pg/rtpostgis.sql.in
===================================================================
--- trunk/raster/rt_pg/rtpostgis.sql.in	2017-05-28 20:48:31 UTC (rev 15411)
+++ trunk/raster/rt_pg/rtpostgis.sql.in	2017-05-29 18:07:55 UTC (rev 15412)
@@ -848,6 +848,7 @@
 	$$ LANGUAGE 'plpgsql' IMMUTABLE _PARALLEL;
 
 -- Availability: 2.2.0
+-- Changed: Mark parallel safe
 CREATE AGGREGATE st_countagg(raster, boolean) (
 	SFUNC = _st_countagg_transfn,
 	STYPE = agg_count,
@@ -1963,7 +1964,7 @@
 				-- per band pixel type check
 				num_bands := st_numbands($1);
 				FOR i IN 1..num_bands LOOP
-					IF st_bandpixeltype($1, i) != '8BUI' THEN
+					IF @extschema at .ST_BandPixelType($1, i) != '8BUI' THEN
 						RAISE EXCEPTION 'The pixel type of band % in the raster is not 8BUI.  JPEG compression can only be used with the 8BUI pixel type.', i;
 					END IF;
 				END LOOP;
@@ -1991,7 +1992,7 @@
 					-- per band pixel type check
 					num_bands := st_numbands($1);
 					FOR i IN 1..num_bands LOOP
-						IF st_bandpixeltype($1, i) != '1BB' THEN
+						IF @extschema at .ST_BandPixelType($1, i) != '1BB' THEN
 							RAISE EXCEPTION 'The pixel type of band % in the raster is not 1BB.  CCITT compression can only be used with the 1BB pixel type.', i;
 						END IF;
 					END LOOP;
@@ -2046,7 +2047,7 @@
 
 		-- JPEG only supports 8BUI pixeltype
 		FOR i IN 1..num_bands LOOP
-			IF st_bandpixeltype(rast, i) != '8BUI' THEN
+			IF @extschema at .ST_BandPixelType(rast, i) != '8BUI' THEN
 				RAISE EXCEPTION 'The pixel type of band % in the raster is not 8BUI.  The JPEG format can only be used with the 8BUI pixel type.', i;
 			END IF;
 		END LOOP;
@@ -2125,7 +2126,7 @@
 
 		-- PNG only supports 8BUI and 16BUI pixeltype
 		FOR i IN 1..num_bands LOOP
-			pt = st_bandpixeltype(rast, i);
+			pt = @extschema at .ST_BandPixelType(rast, i);
 			IF pt != '8BUI' AND pt != '16BUI' THEN
 				RAISE EXCEPTION 'The pixel type of band % in the raster is not 8BUI or 16BUI.  The PNG format can only be used with 8BUI and 16BUI pixel types.', i;
 			END IF;
@@ -2691,7 +2692,7 @@
 -- One Raster ST_MapAlgebra
 -----------------------------------------------------------------------
 -- This function can not be STRICT, because nodataval can be NULL
--- or pixeltype can not be determined (could be st_bandpixeltype(raster, band) though)
+-- or pixeltype can not be determined (could be ST_BandPixelType(raster, band) though)
 CREATE OR REPLACE FUNCTION st_mapalgebraexpr(rast raster, band integer, pixeltype text,
         expression text, nodataval double precision DEFAULT NULL)
     RETURNS raster
@@ -2699,7 +2700,7 @@
     LANGUAGE 'c' IMMUTABLE _PARALLEL;
 
 -- This function can not be STRICT, because nodataval can be NULL
--- or pixeltype can not be determined (could be st_bandpixeltype(raster, band) though)
+-- or pixeltype can not be determined (could be ST_BandPixelType(raster, band) though)
 CREATE OR REPLACE FUNCTION st_mapalgebraexpr(rast raster, pixeltype text, expression text,
         nodataval double precision DEFAULT NULL)
     RETURNS raster
@@ -4758,7 +4759,7 @@
     AS 'MODULE_PATHNAME','RASTER_getBandPath'
     LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
 
-CREATE OR REPLACE FUNCTION st_bandpixeltype(rast raster, band integer DEFAULT 1)
+CREATE OR REPLACE FUNCTION ST_BandPixelType(rast raster, band integer DEFAULT 1)
     RETURNS text
     AS 'MODULE_PATHNAME','RASTER_getBandPixelTypeName'
     LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
@@ -4808,7 +4809,7 @@
         y float8;
         gtype text;
     BEGIN
-        gtype := @extschema at .ST_geometrytype(pt);
+        gtype := @extschema at .ST_GeometryType(pt);
         IF ( gtype != 'ST_Point' ) THEN
             RAISE EXCEPTION 'Attempting to get the value of a pixel with a non-point geometry';
         END IF;
@@ -4850,7 +4851,7 @@
 	AS 'MODULE_PATHNAME', 'RASTER_pixelOfValue'
 	LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
 
-CREATE OR REPLACE FUNCTION st_pixelofvalue(
+CREATE OR REPLACE FUNCTION ST_PixelofValue(
 	rast raster,
 	search double precision[],
 	exclude_nodata_value boolean DEFAULT TRUE,
@@ -4859,7 +4860,7 @@
 	OUT y integer
 )
 	RETURNS SETOF record
-	AS $$ SELECT val, x, y FROM @extschema at .ST_pixelofvalue($1, 1, $2, $3) $$
+	AS $$ SELECT val, x, y FROM @extschema at .ST_PixelOfValue($1, 1, $2, $3) $$
 	LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL;
 
 CREATE OR REPLACE FUNCTION st_pixelofvalue(
@@ -4871,7 +4872,7 @@
 	OUT y integer
 )
 	RETURNS SETOF record
-	AS $$ SELECT x, y FROM @extschema at .ST_pixelofvalue($1, $2, ARRAY[$3], $4) $$
+	AS $$ SELECT x, y FROM @extschema at .ST_PixelofValue($1, $2, ARRAY[$3], $4) $$
 	LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL;
 
 CREATE OR REPLACE FUNCTION st_pixelofvalue(
@@ -4882,7 +4883,7 @@
 	OUT y integer
 )
 	RETURNS SETOF record
-	AS $$ SELECT x, y FROM @extschema at .ST_pixelofvalue($1, 1, ARRAY[$2], $3) $$
+	AS $$ SELECT x, y FROM @extschema at .ST_PixelOfValue($1, 1, ARRAY[$2], $3) $$
 	LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL;
 
 -----------------------------------------------------------------------
@@ -5112,7 +5113,7 @@
 -----------------------------------------------------------------------
 -- ST_SetValues (set one or more pixels to a one or more values)
 -----------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION _st_setvalues(
+CREATE OR REPLACE FUNCTION _ST_SetValues(
 	rast raster, nband integer,
 	x integer, y integer,
 	newvalueset double precision[][],
@@ -5125,7 +5126,7 @@
 	AS 'MODULE_PATHNAME', 'RASTER_setPixelValuesArray'
 	LANGUAGE 'c' IMMUTABLE _PARALLEL;
 
-CREATE OR REPLACE FUNCTION st_setvalues(
+CREATE OR REPLACE FUNCTION ST_SetValues(
 	rast raster, nband integer,
 	x integer, y integer,
 	newvalueset double precision[][],
@@ -5136,7 +5137,7 @@
 	AS $$ SELECT @extschema at ._ST_setvalues($1, $2, $3, $4, $5, $6, FALSE, NULL, $7) $$
 	LANGUAGE 'sql' IMMUTABLE _PARALLEL;
 
-CREATE OR REPLACE FUNCTION st_setvalues(
+CREATE OR REPLACE FUNCTION ST_SetValues(
 	rast raster, nband integer,
 	x integer, y integer,
 	newvalueset double precision[][],
@@ -5148,7 +5149,7 @@
 	LANGUAGE 'sql' IMMUTABLE _PARALLEL;
 
 -- cannot be STRICT as newvalue can be NULL
-CREATE OR REPLACE FUNCTION st_setvalues(
+CREATE OR REPLACE FUNCTION ST_SetValues(
 	rast raster, nband integer,
 	x integer, y integer,
 	width integer, height integer,
@@ -5168,7 +5169,7 @@
 	LANGUAGE 'plpgsql' IMMUTABLE _PARALLEL;
 
 -- cannot be STRICT as newvalue can be NULL
-CREATE OR REPLACE FUNCTION st_setvalues(
+CREATE OR REPLACE FUNCTION ST_SetValues(
 	rast raster,
 	x integer, y integer,
 	width integer, height integer,
@@ -5188,7 +5189,7 @@
 	LANGUAGE 'plpgsql' IMMUTABLE _PARALLEL;
 
 -- cannot be STRICT as newvalue can be NULL
-CREATE OR REPLACE FUNCTION st_setvalues(
+CREATE OR REPLACE FUNCTION ST_SetValues(
 	rast raster, nband integer,
 	geomvalset geomval[],
 	keepnodata boolean DEFAULT FALSE
@@ -5202,19 +5203,19 @@
 -----------------------------------------------------------------------
 
 -- This function can not be STRICT, because newvalue can be NULL for nodata
-CREATE OR REPLACE FUNCTION st_setvalue(rast raster, band integer, x integer, y integer, newvalue float8)
+CREATE OR REPLACE FUNCTION ST_SetValue(rast raster, band integer, x integer, y integer, newvalue float8)
     RETURNS raster
     AS 'MODULE_PATHNAME','RASTER_setPixelValue'
     LANGUAGE 'c' IMMUTABLE _PARALLEL;
 
 -- This function can not be STRICT, because newvalue can be NULL for nodata
-CREATE OR REPLACE FUNCTION st_setvalue(rast raster, x integer, y integer, newvalue float8)
+CREATE OR REPLACE FUNCTION ST_SetValue(rast raster, x integer, y integer, newvalue float8)
     RETURNS raster
-    AS $$ SELECT @extschema at .ST_setvalue($1, 1, $2, $3, $4) $$
+    AS $$ SELECT @extschema at .ST_SetValue($1, 1, $2, $3, $4) $$
     LANGUAGE 'sql';
 
 -- cannot be STRICT as newvalue can be NULL
-CREATE OR REPLACE FUNCTION st_setvalue(
+CREATE OR REPLACE FUNCTION ST_SetValue(
 	rast raster, nband integer,
 	geom geometry, newvalue double precision
 )
@@ -5223,7 +5224,7 @@
 	LANGUAGE 'sql' IMMUTABLE _PARALLEL;
 
 -- cannot be STRICT as newvalue can be NULL
-CREATE OR REPLACE FUNCTION st_setvalue(
+CREATE OR REPLACE FUNCTION ST_SetValue(
 	rast raster,
 	geom geometry, newvalue double precision
 )
@@ -6334,19 +6335,19 @@
 -- ST_DWithin(raster, raster)
 -----------------------------------------------------------------------
 
-CREATE OR REPLACE FUNCTION _st_dwithin(rast1 raster, nband1 integer, rast2 raster, nband2 integer, distance double precision)
+CREATE OR REPLACE FUNCTION _ST_DWithin(rast1 raster, nband1 integer, rast2 raster, nband2 integer, distance double precision)
 	RETURNS boolean
 	AS 'MODULE_PATHNAME', 'RASTER_dwithin'
 	LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
 	COST 1000;
 
-CREATE OR REPLACE FUNCTION st_dwithin(rast1 raster, nband1 integer, rast2 raster, nband2 integer, distance double precision)
+CREATE OR REPLACE FUNCTION ST_DWithin(rast1 raster, nband1 integer, rast2 raster, nband2 integer, distance double precision)
 	RETURNS boolean
 	AS $$ SELECT $1::geometry OPERATOR(@extschema at .&&) ST_Expand(ST_ConvexHull($3), $5) AND $3::geometry OPERATOR(@extschema at .&&) ST_Expand(ST_ConvexHull($1), $5) AND CASE WHEN $2 IS NULL OR $4 IS NULL THEN @extschema at ._ST_dwithin(st_convexhull($1), st_convexhull($3), $5) ELSE @extschema at ._ST_dwithin($1, $2, $3, $4, $5) END $$
 	LANGUAGE 'sql' IMMUTABLE _PARALLEL
 	COST 1000;
 
-CREATE OR REPLACE FUNCTION st_dwithin(rast1 raster, rast2 raster, distance double precision)
+CREATE OR REPLACE FUNCTION ST_DWithin(rast1 raster, rast2 raster, distance double precision)
 	RETURNS boolean
 	AS $$ SELECT @extschema at .st_dwithin($1, NULL::integer, $2, NULL::integer, $3) $$
 	LANGUAGE 'sql' IMMUTABLE _PARALLEL
@@ -6356,21 +6357,21 @@
 -- ST_DFullyWithin(raster, raster)
 -----------------------------------------------------------------------
 
-CREATE OR REPLACE FUNCTION _st_dfullywithin(rast1 raster, nband1 integer, rast2 raster, nband2 integer, distance double precision)
+CREATE OR REPLACE FUNCTION _ST_DFullyWithin(rast1 raster, nband1 integer, rast2 raster, nband2 integer, distance double precision)
 	RETURNS boolean
 	AS 'MODULE_PATHNAME', 'RASTER_dfullywithin'
 	LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
 	COST 1000;
 
-CREATE OR REPLACE FUNCTION st_dfullywithin(rast1 raster, nband1 integer, rast2 raster, nband2 integer, distance double precision)
+CREATE OR REPLACE FUNCTION ST_DFullyWithin(rast1 raster, nband1 integer, rast2 raster, nband2 integer, distance double precision)
 	RETURNS boolean
-	AS $$ SELECT $1::geometry OPERATOR(@extschema at .&&) ST_Expand(ST_ConvexHull($3), $5) AND $3::geometry OPERATOR(@extschema at .&&) ST_Expand(ST_ConvexHull($1), $5) AND CASE WHEN $2 IS NULL OR $4 IS NULL THEN @extschema at ._ST_dfullywithin(st_convexhull($1), st_convexhull($3), $5) ELSE @extschema at ._ST_dfullywithin($1, $2, $3, $4, $5) END $$
+	AS $$ SELECT $1::geometry OPERATOR(@extschema at .&&) @extschema at .ST_Expand(@extschema at .ST_ConvexHull($3), $5) AND $3::geometry OPERATOR(@extschema at .&&) @extschema at .ST_Expand(@extschema at .ST_ConvexHull($1), $5) AND CASE WHEN $2 IS NULL OR $4 IS NULL THEN @extschema at ._ST_DFullyWithin(@extschema at .ST_ConvexHull($1), @extschema at .ST_Convexhull($3), $5) ELSE @extschema at ._ST_DFullyWithin($1, $2, $3, $4, $5) END $$
 	LANGUAGE 'sql' IMMUTABLE _PARALLEL
 	COST 1000;
 
-CREATE OR REPLACE FUNCTION st_dfullywithin(rast1 raster, rast2 raster, distance double precision)
+CREATE OR REPLACE FUNCTION ST_DFullyWithin(rast1 raster, rast2 raster, distance double precision)
 	RETURNS boolean
-	AS $$ SELECT st_dfullywithin($1, NULL::integer, $2, NULL::integer, $3) $$
+	AS $$ SELECT @extschema at .ST_DFullyWithin($1, NULL::integer, $2, NULL::integer, $3) $$
 	LANGUAGE 'sql' IMMUTABLE _PARALLEL
 	COST 1000;
 
@@ -6380,13 +6381,13 @@
 
 CREATE OR REPLACE FUNCTION st_disjoint(rast1 raster, nband1 integer, rast2 raster, nband2 integer)
 	RETURNS boolean
-	AS $$ SELECT CASE WHEN $2 IS NULL OR $4 IS NULL THEN st_disjoint(st_convexhull($1), st_convexhull($3)) ELSE NOT @extschema at ._ST_intersects($1, $2, $3, $4) END $$
+	AS $$ SELECT CASE WHEN $2 IS NULL OR $4 IS NULL THEN @extschema at .ST_Disjoint(@extschema at .ST_ConvexHull($1), @extschema at .ST_ConvexHull($3)) ELSE NOT @extschema at ._ST_intersects($1, $2, $3, $4) END $$
 	LANGUAGE 'sql' IMMUTABLE _PARALLEL
 	COST 1000;
 
-CREATE OR REPLACE FUNCTION st_disjoint(rast1 raster, rast2 raster)
+CREATE OR REPLACE FUNCTION ST_Disjoint(rast1 raster, rast2 raster)
 	RETURNS boolean
-	AS $$ SELECT st_disjoint($1, NULL::integer, $2, NULL::integer) $$
+	AS $$ SELECT @extschema at .ST_Disjoint($1, NULL::integer, $2, NULL::integer) $$
 	LANGUAGE 'sql' IMMUTABLE _PARALLEL
 	COST 1000;
 
@@ -6394,7 +6395,7 @@
 -- ST_Intersection(geometry, raster) in geometry-space
 -----------------------------------------------------------------------
 
-CREATE OR REPLACE FUNCTION st_intersection(geomin geometry, rast raster, band integer DEFAULT 1)
+CREATE OR REPLACE FUNCTION ST_Intersection(geomin geometry, rast raster, band integer DEFAULT 1)
 	RETURNS SETOF geomval AS $$
 	DECLARE
 		intersects boolean := FALSE;
@@ -6431,18 +6432,18 @@
 
 CREATE OR REPLACE FUNCTION st_intersection(rast raster, band integer, geomin geometry)
 	RETURNS SETOF geomval AS
-	$$ SELECT st_intersection($3, $1, $2) $$
-	LANGUAGE 'sql' STABLE;
+	$$ SELECT @extschema at .ST_Intersection($3, $1, $2) $$
+	LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL;
 
-CREATE OR REPLACE FUNCTION st_intersection(rast raster, geomin geometry)
+CREATE OR REPLACE FUNCTION ST_Intersection(rast raster, geomin geometry)
 	RETURNS SETOF geomval AS
-	$$ SELECT st_intersection($2, $1, 1) $$
-	LANGUAGE 'sql' STABLE;
+	$$ SELECT @extschema at .ST_Intersection($2, $1, 1) $$
+	LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL;
 
 -----------------------------------------------------------------------
 -- ST_Intersection(raster, raster)
 -----------------------------------------------------------------------
-CREATE OR REPLACE FUNCTION st_intersection(
+CREATE OR REPLACE FUNCTION ST_Intersection(
 	rast1 raster, band1 int,
 	rast2 raster, band2 int,
 	returnband text DEFAULT 'BOTH',
@@ -6460,23 +6461,23 @@
 			RAISE EXCEPTION 'The two rasters do not have the same SRID';
 		END IF;
 
-		newnodata1 := coalesce(nodataval[1], ST_BandNodataValue(rast1, band1), ST_MinPossibleValue(ST_BandPixelType(rast1, band1)));
-		newnodata2 := coalesce(nodataval[2], ST_BandNodataValue(rast2, band2), ST_MinPossibleValue(ST_BandPixelType(rast2, band2)));
+		newnodata1 := coalesce(nodataval[1], ST_BandNodataValue(rast1, band1), ST_MinPossibleValue(@extschema at .ST_BandPixelType(rast1, band1)));
+		newnodata2 := coalesce(nodataval[2], ST_BandNodataValue(rast2, band2), ST_MinPossibleValue(@extschema at .ST_BandPixelType(rast2, band2)));
 		
 		_returnband := upper(returnband);
 
 		rtn := NULL;
 		CASE
 			WHEN _returnband = 'BAND1' THEN
-				rtn := ST_MapAlgebraExpr(rast1, band1, rast2, band2, '[rast1.val]', ST_BandPixelType(rast1, band1), 'INTERSECTION', newnodata1::text, newnodata1::text, newnodata1);
-				rtn := ST_SetBandNodataValue(rtn, 1, newnodata1);
+				rtn := @extschema at .ST_MapAlgebraExpr(rast1, band1, rast2, band2, '[rast1.val]', @extschema at .ST_BandPixelType(rast1, band1), 'INTERSECTION', newnodata1::text, newnodata1::text, newnodata1);
+				rtn := @extschema at .ST_SetBandNodataValue(rtn, 1, newnodata1);
 			WHEN _returnband = 'BAND2' THEN
-				rtn := ST_MapAlgebraExpr(rast1, band1, rast2, band2, '[rast2.val]', ST_BandPixelType(rast2, band2), 'INTERSECTION', newnodata2::text, newnodata2::text, newnodata2);
-				rtn := ST_SetBandNodataValue(rtn, 1, newnodata2);
+				rtn := @extschema at .ST_MapAlgebraExpr(rast1, band1, rast2, band2, '[rast2.val]', @extschema at .ST_BandPixelType(rast2, band2), 'INTERSECTION', newnodata2::text, newnodata2::text, newnodata2);
+				rtn := @extschema at .ST_SetBandNodataValue(rtn, 1, newnodata2);
 			WHEN _returnband = 'BOTH' THEN
-				rtn := ST_MapAlgebraExpr(rast1, band1, rast2, band2, '[rast1.val]', ST_BandPixelType(rast1, band1), 'INTERSECTION', newnodata1::text, newnodata1::text, newnodata1);
+				rtn := @extschema at .ST_MapAlgebraExpr(rast1, band1, rast2, band2, '[rast1.val]', @extschema at .ST_BandPixelType(rast1, band1), 'INTERSECTION', newnodata1::text, newnodata1::text, newnodata1);
 				rtn := ST_SetBandNodataValue(rtn, 1, newnodata1);
-				rtn := ST_AddBand(rtn, ST_MapAlgebraExpr(rast1, band1, rast2, band2, '[rast2.val]', ST_BandPixelType(rast2, band2), 'INTERSECTION', newnodata2::text, newnodata2::text, newnodata2));
+				rtn := ST_AddBand(rtn, ST_MapAlgebraExpr(rast1, band1, rast2, band2, '[rast2.val]', @extschema at .ST_BandPixelType(rast2, band2), 'INTERSECTION', newnodata2::text, newnodata2::text, newnodata2));
 				rtn := ST_SetBandNodataValue(rtn, 2, newnodata2);
 			ELSE
 				RAISE EXCEPTION 'Unknown value provided for returnband: %', returnband;
@@ -6575,9 +6576,13 @@
 	LANGUAGE 'c' IMMUTABLE _PARALLEL;
 
 -- Availability: 2.1.0
+-- Changed: 2.4.0 mark parallel safe
 CREATE AGGREGATE st_union(raster, unionarg[]) (
 	SFUNC = _st_union_transfn,
 	STYPE = internal,
+#if POSTGIS_PGSQL_VERSION >= 96
+	parallel = safe,
+#endif
 	FINALFUNC = _st_union_finalfn
 );
 
@@ -6588,9 +6593,13 @@
 
 -- Availability: 2.0.0
 -- Changed: 2.1.0 changed definition
+-- Changed: 2.4.0 mark parallel safe
 CREATE AGGREGATE st_union(raster, integer, text) (
 	SFUNC = _st_union_transfn,
 	STYPE = internal,
+#if POSTGIS_PGSQL_VERSION >= 96
+	parallel = safe,
+#endif
 	FINALFUNC = _st_union_finalfn
 );
 
@@ -6601,9 +6610,13 @@
 
 -- Availability: 2.0.0
 -- Changed: 2.1.0 changed definition
+-- Changed: 2.4.0 mark parallel safe
 CREATE AGGREGATE st_union(raster, integer) (
 	SFUNC = _st_union_transfn,
 	STYPE = internal,
+#if POSTGIS_PGSQL_VERSION >= 96
+	parallel = safe,
+#endif
 	FINALFUNC = _st_union_finalfn
 );
 
@@ -6614,9 +6627,13 @@
 
 -- Availability: 2.0.0
 -- Changed: 2.1.0 changed definition
+-- Changed: 2.4.0 mark parallel safe
 CREATE AGGREGATE st_union(raster) (
 	SFUNC = _st_union_transfn,
 	STYPE = internal,
+#if POSTGIS_PGSQL_VERSION >= 96
+	parallel = safe,
+#endif
 	FINALFUNC = _st_union_finalfn
 );
 
@@ -6627,9 +6644,13 @@
 
 -- Availability: 2.0.0
 -- Changed: 2.1.0 changed definition
+-- Changed: 2.4.0 mark parallel safe
 CREATE AGGREGATE st_union(raster, text) (
 	SFUNC = _st_union_transfn,
 	STYPE = internal,
+#if POSTGIS_PGSQL_VERSION >= 96
+	parallel = safe,
+#endif
 	FINALFUNC = _st_union_finalfn
 );
 



More information about the postgis-tickets mailing list