[postgis-tickets] r15404 - Revise to use substring function instead of regexp_matches.
Regina Obe
lr at pcorp.us
Thu May 25 21:41:19 PDT 2017
Author: robe
Date: 2017-05-25 21:41:19 -0700 (Thu, 25 May 2017)
New Revision: 15404
Modified:
trunk/raster/rt_pg/rtpostgis.sql.in
Log:
Revise to use substring function instead of regexp_matches.
This fixes most of the raster regress issues noted in #3759 and
Closes #3760 for PostGIS 2.4.0 (trunk)
Modified: trunk/raster/rt_pg/rtpostgis.sql.in
===================================================================
--- trunk/raster/rt_pg/rtpostgis.sql.in 2017-05-26 04:05:43 UTC (rev 15403)
+++ trunk/raster/rt_pg/rtpostgis.sql.in 2017-05-26 04:41:19 UTC (rev 15404)
@@ -4,6 +4,7 @@
-- PostGIS Raster - Raster Type for PostGIS
-- http://trac.osgeo.org/postgis/wiki/WKTRaster
--
+-- Copyright (c) 2015-2017 Regina Obe <lr at pcorp.us>
-- Copyright (c) 2009-2012 Sandro Santilli <strk at kbt.io>
-- Copyright (c) 2009-2010 Pierre Racine <pierre.racine at sbf.ulaval.ca>
-- Copyright (c) 2009-2010 Jorge Arevalo <jorge.arevalo at deimos-space.com>
@@ -7037,7 +7038,7 @@
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),
More information about the postgis-tickets
mailing list