Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#5520 closed defect (fixed)

GPKG: Quote field names

Reported by: Robert Coup Owned by: Even Rouault
Priority: normal Milestone:
Component: OGR_SF Version: svn-trunk
Severity: normal Keywords: gpkg geopackage
Cc: ryanl, Kyle Shannon

Description

Currently no escaping happens on column names in the Geopackage driver, which means field names with spaces/dashes/etc will cause SQL errors.

Attached patch quotes column names.

Attachments (2)

5520.1.patch (3.4 KB ) - added by Robert Coup 10 years ago.
Patch v1
gpkg_escap_col.diff (5.8 KB ) - added by Kyle Shannon 9 years ago.
missed a few escapes

Download all attachments as: .zip

Change History (8)

by Robert Coup, 10 years ago

Attachment: 5520.1.patch added

Patch v1

comment:1 by Robert Coup, 10 years ago

Cc: ryanl added

comment:2 by Even Rouault, 10 years ago

Looks good to me. I let you apply ?

comment:3 by Robert Coup, 10 years ago

Resolution: fixed
Status: newclosed

Fixed in [27462]

comment:4 by Kyle Shannon, 9 years ago

Cc: Kyle Shannon added

comment:5 by Kyle Shannon, 9 years ago

It looks like there was a little refactoring in between the trunk and 1.11 in gpkg. I've attempted to catch up on escaping column names in the patch, but have to add tests to ensure I don't break it. I will test on 1.11 tonight, and attach tests then.

by Kyle Shannon, 9 years ago

Attachment: gpkg_escap_col.diff added

missed a few escapes

comment:6 by Even Rouault, 9 years ago

Backport in 1.11 was done in #5879

Note: See TracTickets for help on using tickets.