Opened 10 years ago

Closed 6 years ago

#1834 closed enhancement (fixed)

KML Driver rev12157 - spaces in DB Table names generated from KML

Reported by: darkblueB Owned by: Mateusz Łoskot
Priority: low Milestone: 1.9.0
Component: OGR_SF Version: unspecified
Severity: normal Keywords: sqlite
Cc: warmerdam

Description

run the example soc_map_21.kml in ogr2ogr

ogr2ogr -f SQLite soc.sqlite soc_map_21.kml

notice that the output DB has 24 tables, and many of the table names have spaces in them, which confuses the dbms

Attachments (1)

soc_map_21.kml (831.3 KB) - added by darkblueB 10 years ago.

Download all attachments as: .zip

Change History (3)

Changed 10 years ago by darkblueB

Attachment: soc_map_21.kml added

comment:1 Changed 10 years ago by warmerdam

Cc: warmerdam added
Keywords: sqlite added; kml removed
Owner: changed from warmerdam to Mateusz Łoskot
Priority: normallow
Type: defectenhancement

Generally speaking OGR drivers are expected to return layer and field names as they are in the datasource. It is up to output drivers to offer name laundering options if they have restrictions. So I'm reclassifying this as an SQLLite bug report, with the idea that the sqlite driver ought to either quote field/table names so they work even if they have spaces, or it ought to offer a name laundering option.

I am deliberately leaving no milestone and reclassifying as an enhancement.

comment:2 Changed 6 years ago by Even Rouault

Milestone: 1.9.0
Resolution: fixed
Status: newclosed

r22800 /trunk/gdal/ogr/ogrsf_frmts/sqlite/ (ogr_sqlite.h ogrsqlitedatasource.cpp ogrsqlitetablelayer.cpp): SQLite: launder single quote character in table name; properly escape table name if no laundering (#1834)

Note: See TracTickets for help on using tickets.