From: Nicolas Boisselier Date: Fri, 5 Jan 2018 13:57:33 +0000 (+0000) Subject: lib/postgres/lang.sql X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=5997cce099991f95420595b2f58bd5b1465aff14;p=nb.git lib/postgres/lang.sql --- diff --git a/lib/postgres/lang.sql b/lib/postgres/lang.sql new file mode 100644 index 00000000..125fd6bf --- /dev/null +++ b/lib/postgres/lang.sql @@ -0,0 +1,9 @@ +DROP TABLE IF EXISTS lang; +CREATE TABLE IF NOT EXISTS lang ( + id bigint PRIMARY KEY, + name varchar(200) +); +BEGIN TRANSACTION; +DELETE FROM lang; +COPY lang FROM PROGRAM 'curl -s //download.geonames.org/export/dump/alternateNames.zip | zcat | cut -f 1,4' WITH (format 'text', NULL ''); +COMMIT; diff --git a/lib/postgres/zipcode b/lib/postgres/zipcode index 2982f4ee..45be7edd 100755 --- a/lib/postgres/zipcode +++ b/lib/postgres/zipcode @@ -1,7 +1,7 @@ #!/usr/bin/env perl use strict; use warnings; -die('obsolete !!!'); +#die('obsolete !!!'); @ARGV = ('curl -s http://download.geonames.org/export/zip/allCountries.zip | zcat |'); #exec($ARGV[0]); exit;