[postgis-devel] What to return when refering to an invalid band number
Mateusz Loskot
mateusz at loskot.net
Fri Mar 25 08:19:47 PDT 2011
On 25/03/11 15:14, Sandro Santilli wrote:
> 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)
Got it. Taking my word back.
It looks it's better to align with GEOMETRY then
select ST_PointN(ST_GeomFromText('LINESTRING(0 0, 1 1)'), 3);
So, agreed with Sandro.
Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org
Member of ACCU, http://accu.org
More information about the postgis-devel
mailing list