geoname data fails to import, value too long

Bug #1517255 reported by Tim Kuhlman
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Geonames
Fix Released
Undecided
Tim Kuhlman

Bug Description

When running the import-geonames script I receive this error:

2015-11-17 22:49:20 INFO db-relation-changed BEGIN
2015-11-17 22:49:20 INFO db-relation-changed NOTICE: table "geoname_load" does not exist, skipping
2015-11-17 22:49:20 INFO db-relation-changed DROP TABLE
2015-11-17 22:49:20 INFO db-relation-changed CREATE TABLE
2015-11-17 22:50:06 INFO db-relation-changed ERROR: value too long for type character varying(60)
2015-11-17 22:50:06 INFO db-relation-changed CONTEXT: COPY geoname_load, line 10822213, column cc2: "AT,BE,BG,CY,CZ,DE,DK,EE,ES,FI,FR,GB,GR,HR,HU,IE,IT,LT,LU,LV,MT,NL,PL,PT,RO,SE,SI,SK"
2015-11-17 22:50:06 INFO db-relation-changed ERROR: current transaction is aborted, commands ignored until end of transaction block

A possible fix is to expand the size of the cc2 column, but I am not sure if there are other implications to doing that.

Related branches

Revision history for this message
Stuart Bishop (stub) wrote :

Unless there is a genuine upper bound you need to enforce, use 'text' instead of 'varchar(xx)'. With PostgreSQL the only difference internally is the enforcement of the length limit.

Tim Kuhlman (timkuhlman)
Changed in ubuntu-geonames:
assignee: nobody → Tim Kuhlman (timkuhlman)
Tim Kuhlman (timkuhlman)
Changed in ubuntu-geonames:
status: New → Fix Committed
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.