[postgis-tickets] r15513 - Mark 3D functions and some other missed functions as parallel safe.

Regina Obe lr at pcorp.us
Thu Jul 27 21:06:12 PDT 2017


Author: robe
Date: 2017-07-27 21:06:12 -0700 (Thu, 27 Jul 2017)
New Revision: 15513

Modified:
   trunk/postgis/postgis.sql.in
   trunk/postgis/sfcgal.sql.in
Log:
Mark 3D functions and some other missed functions as parallel safe.
References #3792 for PostGIS 2.4 (trunk)

Modified: trunk/postgis/postgis.sql.in
===================================================================
--- trunk/postgis/postgis.sql.in	2017-07-28 03:24:33 UTC (rev 15512)
+++ trunk/postgis/postgis.sql.in	2017-07-28 04:06:12 UTC (rev 15513)
@@ -5496,67 +5496,67 @@
 CREATE OR REPLACE FUNCTION ST_3DDistance(geom1 geometry, geom2 geometry)
 	RETURNS float8
 	AS 'MODULE_PATHNAME', 'distance3d'
-	LANGUAGE 'c' IMMUTABLE STRICT
+	LANGUAGE 'c' IMMUTABLE STRICT  _PARALLEL
 	COST 100;
 
 CREATE OR REPLACE FUNCTION ST_3DMaxDistance(geom1 geometry, geom2 geometry)
 	RETURNS float8
 	AS 'MODULE_PATHNAME', 'LWGEOM_maxdistance3d'
-	LANGUAGE 'c' IMMUTABLE STRICT
+	LANGUAGE 'c' IMMUTABLE STRICT  _PARALLEL
 	COST 100;
 
 CREATE OR REPLACE FUNCTION ST_3DClosestPoint(geom1 geometry, geom2 geometry)
 	RETURNS geometry
 	AS 'MODULE_PATHNAME', 'LWGEOM_closestpoint3d'
-	LANGUAGE 'c' IMMUTABLE STRICT
+	LANGUAGE 'c' IMMUTABLE STRICT  _PARALLEL
 	COST 1; -- reset cost, see #3675
 
 CREATE OR REPLACE FUNCTION ST_3DShortestLine(geom1 geometry, geom2 geometry)
 	RETURNS geometry
 	AS 'MODULE_PATHNAME', 'LWGEOM_shortestline3d'
-	LANGUAGE 'c' IMMUTABLE STRICT
+	LANGUAGE 'c' IMMUTABLE STRICT  _PARALLEL
 	COST 1; -- reset cost, see #3675
 
 CREATE OR REPLACE FUNCTION ST_3DLongestLine(geom1 geometry, geom2 geometry)
 	RETURNS geometry
 	AS 'MODULE_PATHNAME', 'LWGEOM_longestline3d'
-	LANGUAGE 'c' IMMUTABLE STRICT
+	LANGUAGE 'c' IMMUTABLE STRICT  _PARALLEL
 	COST 1; -- reset cost, see #3675
 
 CREATE OR REPLACE FUNCTION _ST_3DDWithin(geom1 geometry, geom2 geometry,float8)
 	RETURNS boolean
 	AS 'MODULE_PATHNAME', 'LWGEOM_dwithin3d'
-	LANGUAGE 'c' IMMUTABLE STRICT
+	LANGUAGE 'c' IMMUTABLE STRICT  _PARALLEL
 	COST 100;
 
 CREATE OR REPLACE FUNCTION ST_3DDWithin(geom1 geometry, geom2 geometry,float8)
 	RETURNS boolean
 	AS 'SELECT $1 OPERATOR(@extschema at .&&) @extschema at .ST_Expand($2,$3) AND $2 OPERATOR(@extschema at .&&) @extschema at .ST_Expand($1,$3) AND @extschema at ._ST_3DDWithin($1, $2, $3)'
-	LANGUAGE 'sql' IMMUTABLE
+	LANGUAGE 'sql' IMMUTABLE  _PARALLEL
 	COST 100;
 
 CREATE OR REPLACE FUNCTION _ST_3DDFullyWithin(geom1 geometry, geom2 geometry,float8)
 	RETURNS boolean
 	AS 'MODULE_PATHNAME', 'LWGEOM_dfullywithin3d'
-	LANGUAGE 'c' IMMUTABLE STRICT
+	LANGUAGE 'c' IMMUTABLE STRICT  _PARALLEL
 	COST 100;
 
 CREATE OR REPLACE FUNCTION ST_3DDFullyWithin(geom1 geometry, geom2 geometry,float8)
 	RETURNS boolean
 	AS 'SELECT $1 OPERATOR(@extschema at .&&) @extschema at .ST_Expand($2,$3) AND $2 OPERATOR(@extschema at .&&) @extschema at .ST_Expand($1,$3) AND @extschema at ._ST_3DDFullyWithin($1, $2, $3)'
-	LANGUAGE 'sql' IMMUTABLE
+	LANGUAGE 'sql' IMMUTABLE  _PARALLEL
 	COST 100;
 
 CREATE OR REPLACE FUNCTION _ST_3DIntersects(geom1 geometry, geom2 geometry)
 	RETURNS boolean
 	AS 'MODULE_PATHNAME','intersects3d'
-	LANGUAGE 'c' IMMUTABLE STRICT
+	LANGUAGE 'c' IMMUTABLE STRICT  _PARALLEL
 	COST 100;
 
 CREATE OR REPLACE FUNCTION ST_3DIntersects(geom1 geometry, geom2 geometry)
 	RETURNS boolean
 	AS 'SELECT $1 OPERATOR(@extschema at .&&) $2 AND @extschema at ._ST_3DIntersects($1, $2)'
-	LANGUAGE 'sql' IMMUTABLE
+	LANGUAGE 'sql' IMMUTABLE  _PARALLEL
 	COST 100;
 
 
@@ -5567,7 +5567,7 @@
 CREATE OR REPLACE FUNCTION ST_CoordDim(Geometry geometry)
 	RETURNS smallint
 	AS 'MODULE_PATHNAME', 'LWGEOM_ndims'
-	LANGUAGE 'c' IMMUTABLE STRICT
+	LANGUAGE 'c' IMMUTABLE STRICT  _PARALLEL
 	COST 5;
 --
 -- SQL-MM
@@ -5630,7 +5630,7 @@
 CREATE OR REPLACE FUNCTION _ST_OrderingEquals(GeometryA geometry, GeometryB geometry)
 	RETURNS boolean
 	AS 'MODULE_PATHNAME', 'LWGEOM_same'
-	LANGUAGE 'c' IMMUTABLE STRICT
+	LANGUAGE 'c' IMMUTABLE STRICT  _PARALLEL
 	COST 100;
 
 -- Availability: 1.3.0
@@ -5639,7 +5639,7 @@
 	AS $$
 	SELECT $1 OPERATOR(@extschema at .~=) $2 AND @extschema at ._ST_OrderingEquals($1, $2)
 	$$
-	LANGUAGE 'sql' IMMUTABLE;
+	LANGUAGE 'sql' IMMUTABLE  _PARALLEL;
 
 -------------------------------------------------------------------------------
 -- SQL/MM - SQL Functions on type ST_Point
@@ -5940,13 +5940,13 @@
 CREATE OR REPLACE FUNCTION _ST_AsX3D(int4, geometry, int4, int4, text)
 	RETURNS TEXT
 	AS 'MODULE_PATHNAME','LWGEOM_asX3D'
-	LANGUAGE 'c' IMMUTABLE;
+	LANGUAGE 'c' IMMUTABLE  _PARALLEL;
 
 -- ST_AsX3D(geom, precision, options)
 CREATE OR REPLACE FUNCTION ST_AsX3D(geom geometry, maxdecimaldigits integer DEFAULT 15, options integer DEFAULT 0)
 	RETURNS TEXT
 	AS $$SELECT @extschema at ._ST_AsX3D(3,$1,$2,$3,'');$$
-	LANGUAGE 'sql' IMMUTABLE;
+	LANGUAGE 'sql' IMMUTABLE  _PARALLEL;
 
 -- make views and spatial_ref_sys public viewable --
 GRANT SELECT ON TABLE geography_columns TO public;

Modified: trunk/postgis/sfcgal.sql.in
===================================================================
--- trunk/postgis/sfcgal.sql.in	2017-07-28 03:24:33 UTC (rev 15512)
+++ trunk/postgis/sfcgal.sql.in	2017-07-28 04:06:12 UTC (rev 15513)
@@ -32,70 +32,70 @@
 CREATE OR REPLACE FUNCTION ST_3DIntersection(geom1 geometry, geom2 geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME','sfcgal_intersection3D'
-       LANGUAGE 'c' IMMUTABLE STRICT
+       LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
        COST 100;
 
 -- Availability: 2.2
 CREATE OR REPLACE FUNCTION ST_3DDifference(geom1 geometry, geom2 geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME','sfcgal_difference3D'
-       LANGUAGE 'c' IMMUTABLE STRICT
+       LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
        COST 100;
        
 -- Availability: 2.2
 CREATE OR REPLACE FUNCTION ST_3DUnion(geom1 geometry, geom2 geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME','sfcgal_union3D'
-       LANGUAGE 'c' IMMUTABLE STRICT
+       LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
        COST 100;
        
 -- Availability: 2.1.0
 CREATE OR REPLACE FUNCTION ST_Tesselate(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME','sfcgal_tesselate'
-       LANGUAGE 'c' IMMUTABLE STRICT
+       LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
        COST 100;
        
 -- Availability: 2.1.0
 CREATE OR REPLACE FUNCTION ST_3DArea(geometry)
        RETURNS FLOAT8
        AS 'MODULE_PATHNAME','sfcgal_area3D'
-       LANGUAGE 'c' IMMUTABLE STRICT
+       LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
        COST 100;
 
 -- Availability: 2.1.0       
 CREATE OR REPLACE FUNCTION ST_Extrude(geometry, float8, float8, float8)
        RETURNS geometry
        AS 'MODULE_PATHNAME','sfcgal_extrude'
-       LANGUAGE 'c' IMMUTABLE STRICT
+       LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
        COST 100;
 
 -- Availability: 2.1.0       
 CREATE OR REPLACE FUNCTION ST_ForceLHR(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME','sfcgal_force_lhr'
-       LANGUAGE 'c' IMMUTABLE STRICT
+       LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
        COST 100;
        
 -- Availability: 2.1.0
 CREATE OR REPLACE FUNCTION ST_Orientation(geometry)
        RETURNS INT4
        AS 'MODULE_PATHNAME','sfcgal_orientation'
-       LANGUAGE 'c' IMMUTABLE STRICT
+       LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
        COST 100;
 
 -- Availability: 2.1.0
 CREATE OR REPLACE FUNCTION ST_MinkowskiSum(geometry, geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME','sfcgal_minkowski_sum'
-       LANGUAGE 'c' IMMUTABLE STRICT
+       LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
        COST 100;
 
 -- Availability: 2.1.0
 CREATE OR REPLACE FUNCTION ST_StraightSkeleton(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME','sfcgal_straight_skeleton'
-       LANGUAGE 'c' IMMUTABLE STRICT
+       LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
        COST 100;
 
 -- Availability: 2.2.0
@@ -126,34 +126,35 @@
        AS 'MODULE_PATHNAME','sfcgal_approximate_medial_axis'
        LANGUAGE 'c'
 #endif // POSTGIS_SFCGAL_VERSION >= 12
-       IMMUTABLE STRICT COST 100;
+       IMMUTABLE STRICT  _PARALLEL 
+       COST 100;
 
 -- Availability: 2.2.0       
 CREATE OR REPLACE FUNCTION ST_IsPlanar(geometry)
        RETURNS boolean
        AS 'MODULE_PATHNAME','sfcgal_is_planar'
-       LANGUAGE 'c' IMMUTABLE STRICT
+       LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
        COST 100;
 
 -- Availability: 2.2
 CREATE OR REPLACE FUNCTION ST_Volume(geometry)
        RETURNS FLOAT8
        AS 'MODULE_PATHNAME','sfcgal_volume'
-       LANGUAGE 'c' IMMUTABLE STRICT
+       LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
        COST 100;
 
 -- Availability: 2.2
 CREATE OR REPLACE FUNCTION ST_MakeSolid(geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME','sfcgal_make_solid'
-       LANGUAGE 'c' IMMUTABLE STRICT
+       LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
        COST 100;
 
 -- Availability: 2.2
 CREATE OR REPLACE FUNCTION ST_IsSolid(geometry)
        RETURNS boolean
        AS 'MODULE_PATHNAME','sfcgal_is_solid'
-       LANGUAGE 'c' IMMUTABLE STRICT
+       LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL
        COST 100;
 
 COMMIT;



More information about the postgis-tickets mailing list