]> git.nbdom.net Git - nb.git/commitdiff
www/dbq/html/default.css
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 8 Jan 2018 05:00:07 +0000 (05:00 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 8 Jan 2018 05:00:07 +0000 (05:00 +0000)
lib/postgres/country.sql
lib/postgres/geo.sql

index 5d7a5f6110203bc9ec0ae0815bb9d6b7377f35e6..b44feb04e638f5d6e9b042748a300db7544083fd 100644 (file)
@@ -44,6 +44,9 @@ CREATE INDEX IF NOT EXISTS country_geoid_idx ON country (geoid);
 CREATE INDEX IF NOT EXISTS country_capital_idx ON country (capital);
 BEGIN TRANSACTION;
 DELETE FROM country;
-COPY country FROM PROGRAM 'curl -s http://download.geonames.org/export/dump/countryInfo.txt | grep -v "^#" | sed "s/\\\\/\\\\\\\\/g"' WITH (format 'text', NULL ''); 
+COPY country FROM PROGRAM 'curl -s http://download.geonames.org/export/dump/countryInfo.txt \
+| grep -v "^#" \
+| sed "s/\\\\/\\\\\\\\/g" \
+' WITH (format 'text', NULL ''); 
 COMMIT;
 
index 8c892c5f411068d1223090fe4ba6f7296f094763..4b3731ddede27b17fca991d85ddd016e2bdf8968 100644 (file)
@@ -48,6 +48,6 @@ DELETE FROM geo;
 COPY geo FROM PROGRAM 'curl -s http://download.geonames.org/export/dump/allCountries.zip \
 | zcat \
 | awk "{\$7=\$7\".\"\$8;print}" FS="\t" OFS="\t" \
-| cut -f -7,9-10,15-
+| cut -f -7,9-10,15- \
 ' WITH (format 'text', NULL '');
 COMMIT;