[fdo-internals] FDO OGR Provider: NULL values in integer Field

Gabriele Monfardini gabrimonfa at gmail.com
Mon Feb 22 13:42:42 EST 2010


Hi all,

I'm using FDO 3.4.0 OGR provider to connect to a PostgreSQL db (using
a modified GDAL library built with PostgreSQL support).
In fact, I'm using Mapguide Open Source 2.1 that uses FDO 3.4.0.

I'm trying to stylize a layer in Mapguide, aka doing a query that
involves searching for NULL (and NOT NULL) values in an integer field
of a PostgreSQL table.
After a lot of fiddling it seems that tuples with NULL values can be
retrieved only searching for tuples that have the value 0 in that
field.

This is obviously very odd since 0 is a valid integer, so it appears
that I cannot distinguish tuples with proper zeros in the field from
tuples with unknown values.
Moreover ogr itself is able to support NULL values correctly.

I've read this previous thread
http://n2.nabble.com/RE-mapguide-internals-Exception-thrown-on-null-values-tp2051195p2051195.html.

Is FDO OGR provider avoiding NULL value intricacy when dealing with
integer fields converting the NULL value in a zero?

Do you suggest opening a bug against FDO OGR provider or it is a
by-design behaviour of FDO OGR provider?

Regards,

Gabriele


More information about the fdo-internals mailing list