]> granicus.if.org Git - postgis/commitdiff
Revise to use substring function instead of regexp_matches.
authorRegina Obe <lr@pcorp.us>
Fri, 26 May 2017 04:41:19 +0000 (04:41 +0000)
committerRegina Obe <lr@pcorp.us>
Fri, 26 May 2017 04:41:19 +0000 (04:41 +0000)
This fixes most of the raster regress issues noted in #3759 and
Closes #3760 for PostGIS 2.4.0 (trunk)

git-svn-id: http://svn.osgeo.org/postgis/trunk@15404 b70326c6-7e19-0410-871a-916f4a2858ee

raster/rt_pg/rtpostgis.sql.in

index 4007ce356ee43c71a4110e11ae744d6edb9f0432..480345cfd2b781ab731d5a9ada12e7d9ca60e1f2 100644 (file)
@@ -4,6 +4,7 @@
 -- PostGIS Raster - Raster Type for PostGIS
 -- http://trac.osgeo.org/postgis/wiki/WKTRaster
 --
+-- Copyright (c) 2015-2017 Regina Obe <lr@pcorp.us>
 -- Copyright (c) 2009-2012 Sandro Santilli <strk@kbt.io>
 -- Copyright (c) 2009-2010 Pierre Racine <pierre.racine@sbf.ulaval.ca>
 -- Copyright (c) 2009-2010 Jorge Arevalo <jorge.arevalo@deimos-space.com>
@@ -7037,7 +7038,7 @@ CREATE OR REPLACE FUNCTION _raster_constraint_info_blocksize(rastschema name, ra
        SELECT
                CASE
                        WHEN strpos(s.consrc, 'ANY (ARRAY[') > 0 THEN
-                               split_part((regexp_matches(s.consrc, E'ARRAY\\[(.*?){1}\\]'))[1], ',', 1)::integer
+                               split_part((substring(s.consrc FROM E'ARRAY\\[(.*?){1}\\]')), ',', 1)::integer
                        ELSE
                                regexp_replace(
                                        split_part(s.consrc, '= ', 2),