[postgis-tickets] [PostGIS] #3760: raster blocksize check failing on PostgreSQL 10 _raster_constraint_info_blocksize is broken
PostGIS
trac at osgeo.org
Thu May 25 15:10:42 PDT 2017
#3760: raster blocksize check failing on PostgreSQL 10
_raster_constraint_info_blocksize is broken
----------------------+---------------------------
Reporter: robe | Owner: robe
Type: defect | Status: assigned
Priority: blocker | Milestone: PostGIS 2.4.0
Component: raster | Version: trunk
Resolution: | Keywords:
----------------------+---------------------------
Comment (by robe):
okay figured out problem. Has to do with change of how set returning
functions are processed in CASE statements. Boy I didn't realized this
change when I read about it would cause so much grief.
So problem is our use of regexp_matches:
{{{
CASE
WHEN strpos(s.consrc, 'ANY (ARRAY[') > 0 THEN
split_part((regexp_matches(s.consrc,
E'ARRAY\\[(.*?){1}\\]'))[1], ',', 1)::integer
ELSE
regexp_replace(
split_part(s.consrc, '= ', 2),
'[\(\)]', '', 'g'
)::integer
END
}}}
I think in pre-postgresql 10 the CASE statement would short-circuit before
it hit the regexp_matches test and since regexp_matches is as set
returning, when it returns nothing it causes the row not to be output.
This feels to me like an unintended consequence, but I guess I'll read the
fine print in the release notes, and whine if it seems unintended.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3760#comment:1>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list