GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Import GeoNames dump into Postgres  XML
Forum Index -> FAQ - frequently asked questions Go to Page: Previous  1, 2
Author Message
mpscheidt



Joined: 25/03/2016 12:48:43
Messages: 2
Offline

And the corresponding copy command is

Code:
 copy countryInfo  (iso_alpha2,iso_alpha3,iso_numeric,fips_code,name,capital,areaInSqKm,population,continent,tld,currencycode,currencyname,phone,postalcodeformat,postalcoderegex,languages,geonameId,neighbours,equivalentfipscode) 
 from 'countryInfo.txt' null as '';
 
Sharoun



Joined: 14/02/2017 18:17:38
Messages: 1
Offline

To fix, just remove the quotes round the field names before creating the table. The sample 'create.sql' filemy sizegenetics customer reviews at the head of this thread quotes the field names for the countryInfo table, forcing the I in geonameId to uppercase. psql appears to lowercase field names typed in (I'm using 8.2.4 on debian testing), so it never matches the stored field name.
 
Forum Index -> FAQ - frequently asked questions Go to Page: Previous  1, 2
Go to:   
Powered by JForum 2.1.5 © JForum Team