Skip to content

Commit

Permalink
Revise to use substring function instead of regexp_matches.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
robe2 committed May 26, 2017
1 parent 5e5e691 commit b76ffbd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion raster/rt_pg/rtpostgis.sql.in
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit b76ffbd

Please sign in to comment.