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.
Qeuinton



Joined: 06/03/2019 11:19:21
Messages: 1
Offline

I'm completely new to postgres, but it appears to be a capitalization issue. The sample 'create.sql' file 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.

To fix, just remove the quotes round the field names before creating the table.

i will be using v tight gel this summer
Richard Tobin



Joined: 06/02/2008 16:22:48
Messages: 7
Offline

I'd like to be able to do case-insensitive searches for place names. Is there any reason not to use the citext type for name, asciiname, etc?
Richard Tobin



Joined: 06/02/2008 16:22:48
Messages: 7
Offline

Richard Tobin wrote:
I'd like to be able to do case-insensitive searches for place names. Is there any reason not to use the citext type for name, asciiname, etc? 

I didn't get any reply to this, so I'm just reporting that it seems to work satisfactorily.
DerrickAntoine



Joined: 17/10/2020 00:05:31
Messages: 1
Offline

mapscheidt wrote:
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 '';
 
 


you can use the command shell ?
 
Forum Index -> FAQ - frequently asked questions Go to Page: Previous  1, 2
Go to:   
Powered by JForum 2.1.5 © JForum Team