[gdal-dev] Anyone against making OGR SQL 'SUBSTR' conformant with
other SQL implementations ?
etourigny.dev at gmail.com
Thu Nov 24 17:28:43 EST 2011
+1, but maybe add a short note in the ogr sql doc ?
On Thu, Nov 24, 2011 at 8:15 PM, Daniel Morissette
<dmorissette at mapgears.com> wrote:
> On 11-11-24 04:47 PM, Even Rouault wrote:
>> The implementation of the OGR SQL SUBSTR(string, offset[, length])
>> considers that the character offset is like the convention of the C
>> that is to say that the first character is offset 0, the second one is
>> offset 1,
>> etc... All other SQL implementations I've found consider 1 as the first
>> character, 2 as the second one.
>> For details and patch, see http://trac.osgeo.org/gdal/ticket/4348
>> The only reason I'm reporting publicly here is that fixing that could
>> existing applications/scripts. The risk seems limited however because this
>> function was introduced in 1.8.0 and happens not to be documented in
>> So I think I'll apply the fix in trunk, and likely in 1.8 branch too. With
>> notice in the backward compatibility section of the NEWS file.
> No objection here since this seems to be better than carrying an
> incompatibility for ever.
> Daniel Morissette
> Provider of Professional MapServer Support since 2000
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
More information about the gdal-dev