Opened 10 years ago

Last modified 10 years ago

#2812 closed defect

[raster] ST_Band that takes delimeter doesn't accept all characters — at Version 3

Reported by: robe Owned by: Bborie Park
Priority: low Milestone: PostGIS 2.2.0
Component: raster Version: master
Keywords: history Cc:

Description (last modified by robe)

As noted in #2180 we should deprecate this function or fix it to be less restrictive.

In revising the docs, I discoveed I can not do this:

ST_Band(rast,'1|2|3', '|')

Which is my next favorite delimeter next to the default ','. The reason is because the function is defined like this:

SELECT st_band($1, regexp_split_to_array(regexp_replace($2, '[[:space:]]', '', 'g'), $3)::int[]) 

So use of any kind of white space or regular expression key character is disallowed. We should clean this up a bit or just deprecate this function.

As stated why anyone would want to change the delimeter seems spurious and having an additonal function just so I can type '1,2,3' instead of the slightly longer

'{1,2,3}'::int[]
}} I don't think is worth it. 

Change History (3)

comment:1 by robe, 10 years ago

Description: modified (diff)

comment:2 by robe, 10 years ago

Description: modified (diff)

comment:3 by robe, 10 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.