- Run
./import.sh -gfromgeonames_pg_importto download the geonames data sqitch deploy 2_add_tables- Run
./import.sh -ifromgeonames_pg_import sqitch deploy 7_add_country_fk
- https://www.postgresql.org/docs/current/libpq-pgpass.html
- https://tableplus.com/blog/2019/09/how-to-use-pgpass-in-postgresql.html
echo "localhost:5432:mydb:myuser:mypassword" >> ~/.pgpass
chmod 0600 ~/.pgpasssqitch add appschema -n 'Add schema for all flipr objects.'
- https://github.com/sqitchers/sqitch/blob/develop/lib/sqitch-passwords.pod
- https://metacpan.org/pod/sqitch-authentication
- https://github.com/cioionut/geonames_pg_import
- https://event.ifi.uni-heidelberg.de/wp-content/uploads/2017/03/geonames_installation.pdf
- https://github.com/swidz/GeoNames-PostgreSQL-DataImport
sqitch deploy table_constraints
SELECT distinct g.admin1 FROM public.geoname g
left join public.admin1_codes ac on g.country || '.' || g.admin1 = ac.code
where
country = 'GB' and (g.admin1 != '00') and ac.code is NULL