From 935caaaab8eef9471204c1c5b167bb00c7b7d15d Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Mon, 8 Jan 2018 05:00:07 +0000 Subject: [PATCH] www/dbq/html/default.css --- lib/postgres/country.sql | 5 ++++- lib/postgres/geo.sql | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/postgres/country.sql b/lib/postgres/country.sql index 5d7a5f61..b44feb04 100644 --- a/lib/postgres/country.sql +++ b/lib/postgres/country.sql @@ -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; diff --git a/lib/postgres/geo.sql b/lib/postgres/geo.sql index 8c892c5f..4b3731dd 100644 --- a/lib/postgres/geo.sql +++ b/lib/postgres/geo.sql @@ -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; -- 2.47.3