Opened 11 years ago

Closed 11 years ago

#5096 closed defect (fixed)

Trouble with PostgreSQL hstore quoting rules

Reported by: Jukka Rahkonen Owned by: warmerdam
Priority: normal Milestone: 1.10.1
Component: OGR_SF Version: 1.10.0
Severity: normal Keywords: osm pg hstore


The hstore column type in the PostgreSQL driver does not cope well with some key/value pairs which occur in OSM data.

Ogr2ogr command for repeating the issue and a sample of error messages follow.

ogr2ogr -f PostgreSQL PG:"dbname='gis' host='server' port='4326' user='user'
password='passwd'" germany.osm.pbf -gt 20000 -progress --config
OSM_COMPRESS_NODES YES  -lco DIM=2 -lco geometry_name=geoloc -lco fid=fid
-lco COLUMN_TYPES=other_tags=hstore --config PG_USE_COPY YES

ERROR 1: COPY statement failed.
ERROR:  Unexpected end of string
CONTEXT:  COPY points, line 9241, column other_tags: "addr:housenumber=>"

ERROR:  Syntax error near '8' at position 22
CONTEXT:  COPY points, line 17629, column other_tags: "opening_hours=>Mo-Fr.

ERROR:  Syntax error near 'S' at position 45
CONTEXT:  COPY lines, line 17840, column other_tags:
"addr:interpolation=>,addr:street=>"Lintacher Straße""

Change History (1)

comment:1 by Even Rouault, 11 years ago

Component: defaultOGR_SF
Keywords: osm pg hstore added
Milestone: 1.10.1
Resolution: fixed
Status: newclosed
Version: unspecified1.10.0

Fxied in trunk (r26050) and branches/1.10 (r26051)

Note: See TracTickets for help on using tickets.