From 5997cce099991f95420595b2f58bd5b1465aff14 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Fri, 5 Jan 2018 13:57:33 +0000 Subject: [PATCH] lib/postgres/lang.sql --- lib/postgres/lang.sql | 9 +++++++++ lib/postgres/zipcode | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 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; -- 2.47.3