[postgis-devel] What to return when refering to an invalid band number

Sandro Santilli strk at keybit.net
Fri Mar 25 08:14:40 PDT 2011


On Fri, Mar 25, 2011 at 12:02:57PM +0100, Jorge Arévalo wrote:
> On Fri, Mar 25, 2011 at 12:31 AM, Mateusz Loskot <mateusz at loskot.net> wrote:
>
>> IMHO, index out of range is an error condition, an exception, and as such it
>> should result with error.
> 
> +1 for that.

I tend to disagree.
Out of range values are unknown, and as such should be threated.

For example:

=# select substring('test' from 10 for 1);
 substring
-----------

(1 row)

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html



More information about the postgis-devel mailing list