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

Paragon Corporation lr at pcorp.us
Fri Mar 25 10:26:06 PDT 2011



>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;

I agree with Sandro about out of range.  If you get a NULL, I think its
pretty clear and accepted that means unknown and better yet is easy to
filter out in a batch query.  

An example case where this might happen and I really don't give a damn, is
if I do a generate series call to pull out the first n row/col values of a
raster.  If I slide off the raster, I would just want NULL and then filter
it out in my where clause.






More information about the postgis-devel mailing list