Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#5379 closed defect (fixed)

OGR SQL query fails if a field name contains a dot

Reported by: wonder Owned by: warmerdam
Priority: normal Milestone: 1.11.0
Component: OGR_SF Version: svn-trunk
Severity: normal Keywords:


Please see the attached shapefile - it has two fields: "id" and "oo.pp_aa"

OGR handles reads the shapefile without any problems, but there is an issue with SQL query.

When I use SQL query, an error is reported about unrecognized field name (note that the field name is not mentioned in the query):

$ ogrinfo -sql "select * from rr2" rr2.shp
INFO: Open of `rr2.shp'
      using driver `ESRI Shapefile' successful.
ERROR 1: Unrecognised field name oo.pp_aa.

Attachments (1) (1.1 KB ) - added by wonder 10 years ago.

Download all attachments as: .zip

Change History (4)

by wonder, 10 years ago

Attachment: added

comment:1 by Jukka Rahkonen, 10 years ago

Confirmed with two week old gisinternals binaries. Also tested that SQLite dialect does not have troubles

ogrinfo -dialect sqlite -sql "select * from rr2" rr2.shp

comment:2 by Even Rouault, 10 years ago

Component: defaultOGR_SF
Milestone: 2.0
Resolution: fixed
Status: newclosed

trunk r26930 "OGR SQL: fix SELECT * on a layer with a field that has a dot character (#5379)"

(A workaround is to use "select x.* from rr2 x" where x can be any string, but that will prefix field names with x.)

comment:3 by Even Rouault, 10 years ago

Note: See TracTickets for help on using tickets.