[gdal-dev] OGR SQL implicit conversions

Tamas Szekeres szekerest at gmail.com
Wed Sep 21 13:20:17 EDT 2011


Hi Devs,

We have some problems due to the recent changes in the SQL expression parser
which is related to the change in the implicit type conversion behaviour.

Formerly we could safely use the following statement:

select * from mytable where ogr_fid in ('1100','1101','1102')

If the data type of ogr_fid is an integer or float then the expression
evaluator has converted the string constants to numeric values implicitly.

As of 1.8 the parser reports an error due to the incompatible types in the
expression.

I've added a ticket #4259 <http://trac.osgeo.org/gdal/ticket/4259> related
to this problem including a patch to handle these string to numeric
conversions.

However I'm a bit uncertain whether some other conversions should also be
supported or not. Having a larger number of conversion rules we might
probably think about rewriting the current approach by using a more generic
implementation.

Any ideas?


Best regards,

Tamas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110921/8fdbeebe/attachment.html


More information about the gdal-dev mailing list