[Tile-serving] [openstreetmap/osm2pgsql] Large values cause import failure when using int4 columns (#955)
Andy Allan
notifications at github.com
Thu Sep 26 14:29:37 UTC 2019
With the following style file:
```
# OsmType Tag DataType Flags
node,way population int4 linear
```
and the following osm file:
```
<?xml version="1.0" encoding="UTF-8"?>
<osm version="0.6">
<node id="1" visible="true" version="1" changeset="1" timestamp="2018-10-31T10:20:19Z" user="a" uid="1" lat="51.4779481" lon="-0.0014863">
<tag k="population" v="4000000000" />
</node>
</osm>
```
and the following command line
```
osm2pgsql -d osm2pgsql-test --style int4.style int4.xml
```
I get a failure of:
```
...snip...
Relation stats: total(0), max(0) in 0s
DB writer thread failed due to ERROR: result COPY_END for planet_osm_point failed:
ERROR: value "4000000000" is out of range for type integer
CONTEXT: COPY planet_osm_point, line 1, column population: "4000000000"
```
I think it would be reasonable for osm2pgsql to just drop numbers that are outside of the valid int4 range, since it already drops anything that it can't interpret as a number from these columns.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/955
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20190926/a6905b13/attachment.html>
More information about the Tile-serving
mailing list