[postgis-tickets] r17010 - SP-GiST within got into 3.0.0 not 2.5.0.

Darafei komzpa at gmail.com
Tue Nov 13 11:47:59 PST 2018


Author: komzpa
Date: 2018-11-13 11:47:59 -0800 (Tue, 13 Nov 2018)
New Revision: 17010

Modified:
   trunk/postgis/postgis.sql.in
   trunk/postgis/postgis_spgist.sql.in
   trunk/utils/postgis_proc_upgrade.pl
Log:
SP-GiST within got into 3.0.0 not 2.5.0.

References #4230



Modified: trunk/postgis/postgis.sql.in
===================================================================
--- trunk/postgis/postgis.sql.in	2018-11-13 12:59:41 UTC (rev 17009)
+++ trunk/postgis/postgis.sql.in	2018-11-13 19:47:59 UTC (rev 17010)
@@ -824,13 +824,13 @@
 	JOIN = gserialized_gist_joinsel_nd
 );
 
--- Availability: 2.5.0
+-- Availability: 3.0.0
 CREATE OR REPLACE FUNCTION geometry_contains_nd(geometry, geometry)
 	RETURNS boolean
 	AS 'MODULE_PATHNAME' ,'gserialized_contains'
 	LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
 
--- Availability: 2.5.0
+-- Availability: 3.0.0
 CREATE OPERATOR ~~ (
 	LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_contains_nd,
 	COMMUTATOR = '@@',
@@ -838,13 +838,13 @@
 	JOIN = gserialized_gist_joinsel_nd
 );
 
--- Availability: 2.5.0
+-- Availability: 3.0.0
 CREATE OR REPLACE FUNCTION geometry_within_nd(geometry, geometry)
 	RETURNS boolean
 	AS 'MODULE_PATHNAME' ,'gserialized_within'
 	LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
 
--- Availability: 2.5.0
+-- Availability: 3.0.0
 CREATE OPERATOR @@ (
 	LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_within_nd,
 	COMMUTATOR = '~~',
@@ -852,13 +852,13 @@
 	JOIN = gserialized_gist_joinsel_nd
 );
 
--- Availability: 2.5.0
+-- Availability: 3.0.0
 CREATE OR REPLACE FUNCTION geometry_same_nd(geometry, geometry)
 	RETURNS boolean
 	AS 'MODULE_PATHNAME' ,'gserialized_same'
 	LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
 
--- Availability: 2.5.0
+-- Availability: 3.0.0
 CREATE OPERATOR ~~= (
 	LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = geometry_same_nd,
 	COMMUTATOR = '~~=',

Modified: trunk/postgis/postgis_spgist.sql.in
===================================================================
--- trunk/postgis/postgis_spgist.sql.in	2018-11-13 12:59:41 UTC (rev 17009)
+++ trunk/postgis/postgis_spgist.sql.in	2018-11-13 19:47:59 UTC (rev 17010)
@@ -172,38 +172,38 @@
 -- Geometry
 -- ---------- ---------- ---------- ---------- ---------- ---------- ----------
 
--- Availability: 2.5.0
+-- Availability: 3.0.0
 CREATE OR REPLACE FUNCTION geometry_spgist_config_nd(internal, internal)
 	RETURNS void
 	AS 'MODULE_PATHNAME' ,'gserialized_spgist_config_nd'
 	LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
--- Availability: 2.5.0
+-- Availability: 3.0.0
 CREATE OR REPLACE FUNCTION geometry_spgist_choose_nd(internal, internal)
 	RETURNS void
 	AS 'MODULE_PATHNAME' ,'gserialized_spgist_choose_nd'
 	LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
--- Availability: 2.5.0
+-- Availability: 3.0.0
 CREATE OR REPLACE FUNCTION geometry_spgist_picksplit_nd(internal, internal)
 	RETURNS void
 	AS 'MODULE_PATHNAME' ,'gserialized_spgist_picksplit_nd'
 	LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
--- Availability: 2.5.0
+-- Availability: 3.0.0
 CREATE OR REPLACE FUNCTION geometry_spgist_inner_consistent_nd(internal, internal)
 	RETURNS void
 	AS 'MODULE_PATHNAME' ,'gserialized_spgist_inner_consistent_nd'
 	LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
--- Availability: 2.5.0
+-- Availability: 3.0.0
 CREATE OR REPLACE FUNCTION geometry_spgist_leaf_consistent_nd(internal, internal)
 	RETURNS bool
 	AS 'MODULE_PATHNAME' ,'gserialized_spgist_leaf_consistent_nd'
 	LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
--- Availability: 2.5.0
+-- Availability: 3.0.0
 CREATE OR REPLACE FUNCTION geometry_spgist_compress_nd(internal)
 	RETURNS internal
 	AS 'MODULE_PATHNAME' ,'gserialized_spgist_compress_nd'
 	LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
 
--- Availability: 2.5.0
+-- Availability: 3.0.0
 CREATE OPERATOR CLASS spgist_geometry_ops_nd
 	FOR TYPE geometry USING SPGIST AS
 	OPERATOR        3        &&& ,
@@ -221,38 +221,38 @@
 -- Geography
 -- ---------- ---------- ---------- ---------- ---------- ---------- ----------
 
--- Availability: 2.5.0
+-- Availability: 3.0.0
 CREATE OR REPLACE FUNCTION geography_spgist_config_nd(internal, internal)
 	RETURNS void
 	AS 'MODULE_PATHNAME' ,'gserialized_spgist_config_nd'
 	LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
--- Availability: 2.5.0
+-- Availability: 3.0.0
 CREATE OR REPLACE FUNCTION geography_spgist_choose_nd(internal, internal)
 	RETURNS void
 	AS 'MODULE_PATHNAME' ,'gserialized_spgist_choose_nd'
 	LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
--- Availability: 2.5.0
+-- Availability: 3.0.0
 CREATE OR REPLACE FUNCTION geography_spgist_picksplit_nd(internal, internal)
 	RETURNS void
 	AS 'MODULE_PATHNAME' ,'gserialized_spgist_picksplit_nd'
 	LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
--- Availability: 2.5.0
+-- Availability: 3.0.0
 CREATE OR REPLACE FUNCTION geography_spgist_inner_consistent_nd(internal, internal)
 	RETURNS void
 	AS 'MODULE_PATHNAME' ,'gserialized_spgist_inner_consistent_nd'
 	LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
--- Availability: 2.5.0
+-- Availability: 3.0.0
 CREATE OR REPLACE FUNCTION geography_spgist_leaf_consistent_nd(internal, internal)
 	RETURNS bool
 	AS 'MODULE_PATHNAME' ,'gserialized_spgist_leaf_consistent_nd'
 	LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
--- Availability: 2.5.0
+-- Availability: 3.0.0
 CREATE OR REPLACE FUNCTION geography_spgist_compress_nd(internal)
 	RETURNS internal
 	AS 'MODULE_PATHNAME' ,'gserialized_spgist_compress_nd'
 	LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
 
--- Availability: 2.5.0
+-- Availability: 3.0.0
 CREATE OPERATOR CLASS spgist_geography_ops_nd
 	DEFAULT FOR TYPE geography USING SPGIST AS
 	OPERATOR        3        && ,

Modified: trunk/utils/postgis_proc_upgrade.pl
===================================================================
--- trunk/utils/postgis_proc_upgrade.pl	2018-11-13 12:59:41 UTC (rev 17009)
+++ trunk/utils/postgis_proc_upgrade.pl	2018-11-13 19:47:59 UTC (rev 17010)
@@ -402,10 +402,14 @@
 					chop $subdefn;
 					$subdefn =~ s/[,;]$//; # strip ending comma or semicolon
 					# argument types must be specified in ALTER OPERATOR FAMILY
-					if ( $subdefn =~ m/\s+(OPERATOR.*)/ )
+					if ( $subdefn =~ m/\s+(OPERATOR.*)(FOR.*)/ )
 					{
 						$subdefn = $1.'('.$opctype.','.$opctype.') '.$2;
 					}
+					elsif ( $subdefn =~ m/\s+(OPERATOR.*)/ )
+					{
+						$subdefn = $1.'('.$opctype.','.$opctype.') '
+					}
 					elsif ( $subdefn =~ m/\s+(FUNCTION\s+[0-9]+ )(.*)/ )
 					{
 						$subdefn = $1.'('.$opctype.','.$opctype.') '.$2;



More information about the postgis-tickets mailing list