]> git.nbdom.net Git - nb.git/commitdiff
lib/postgres/lang.sql
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Fri, 5 Jan 2018 13:57:33 +0000 (13:57 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Fri, 5 Jan 2018 13:57:33 +0000 (13:57 +0000)
lib/postgres/lang.sql [new file with mode: 0644]
lib/postgres/zipcode

diff --git a/lib/postgres/lang.sql b/lib/postgres/lang.sql
new file mode 100644 (file)
index 0000000..125fd6b
--- /dev/null
@@ -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;
index 2982f4ee8b39c0736664eb036ec1d30e591cc865..45be7edd0ff6609242cf5572a0314d84b532e123 100755 (executable)
@@ -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;