Opened 10 years ago

Closed 10 years ago

#2812 closed defect (fixed)

[raster] ST_Band that takes delimeter doesn't accept all characters

Reported by: robe Owned by: dustymugs
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 (5)

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)

comment:4 by robe, 10 years ago

Description: modified (diff)

comment:5 by dustymugs, 10 years ago

Keywords: history added
Resolution: fixed
Status: newclosed

Added better handling of delimiter. r12741 for -trunk. r12742 for 2.1. r12743 for 2.0.

Note: See TracTickets for help on using tickets.