This is a guide to getting the raw text formatted GeoNames data dumps structured and imported into a PostGIS database. It imports all related GeoNames data into tables, creates the proper geometry and indexes, as well as foreign key mappings between the tables.
The feature codes list is useful for determining what fcode features you want to extract from the geoname table for use in maps or derivative datasets.
wget http://download.geonames.org/export/dump/allCountries.zip
wget http://download.geonames.org/export/dump/alternateNames.zip