[gdal-dev] OGR SQL: Excecuting select where column name contains "."

Odd Ragnar Lydersen Odd-Ragnar.Lydersen at powel.no
Tue Oct 9 00:53:59 PDT 2012


The problem is OGRSQL (ogr_gensql.cpp) which adds the string "FIELD_%d" when it doesn't know how to handle column names with dot character in them. Because the dot character is a special/reserved character it needs to be enclosed in '', "", ``, [], ..., all depending on which dialect is used  (MS SqlServer, Oracle, MySQL, SqlLite, ...)
So it seems that to me that this is not legal in OGRSQL

>Odd-Ragnar<

-----Original Message-----
From: Even Rouault [mailto:even.rouault at mines-paris.org] 
Sent: 8. oktober 2012 22:42
To: gdal-dev at lists.osgeo.org
Cc: Rahkonen Jukka
Subject: Re: [gdal-dev] OGR SQL: Excecuting select where column name contains "."


> There may be something wrong with TinyOWS but it must be noted that it 
> has passed all the CITE tests for WFS 1.0.0 and 1.1.0.  If so well 
> tested server fails with dots in the field names it is very probable 
> that there are lots of other servers and clients which will fail too.

The CITE tests don't necessarily test all corner cases of implementations. 
They test the requirements and the protocol of the standard, so there are likely many holes in the test coverage. For example, I believe that a WFS/WMS implementation can pass the CITE tests but may not behave properly with the annoying axis ordering problem when using real world datasets (for example when serving a shapefile that uses the standard long/lat ordering and whose coordinates must be swapped when going from/to WFS 1.1)

I've looked at WFS 1.1 spec, and at page 17 (§7.3 Property names), I see that the definition of the property name allows a dot character. So this is theoretically valid... 



More information about the gdal-dev mailing list