[postgis-tickets] [PostGIS] #2812: [raster] ST_Band that takes delimeter doesn't accept all characters
PostGIS
trac at osgeo.org
Fri Jul 4 21:31:35 PDT 2014
#2812: [raster] ST_Band that takes delimeter doesn't accept all characters
--------------------+-------------------------------------------------------
Reporter: robe | Owner: dustymugs
Type: defect | Status: new
Priority: low | Milestone: PostGIS 2.2.0
Component: raster | Version: trunk
Keywords: |
--------------------+-------------------------------------------------------
Description changed by robe:
Old description:
> 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.
New description:
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.
--
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2812#comment:3>
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