]> git.nbdom.net Git - nb.git/commitdiff
lib/postgres/geo.sql
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Sat, 6 Jan 2018 02:40:47 +0000 (02:40 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Sat, 6 Jan 2018 02:40:47 +0000 (02:40 +0000)
lib/postgres/continent.sql
lib/postgres/host_ads.sql [deleted file]
lib/postgres/hostads.sql [new file with mode: 0644]
lib/postgres/lang.sql
lib/postgres/timezone.sql

index 14cceb10ed80e5a426cfcb4703c4932048ca8157..2f458c3f63ed2bb2f1484a68fdd5e88cdb440893 100644 (file)
@@ -1,7 +1,7 @@
 DROP TABLE IF EXISTS continent;
 CREATE TABLE IF NOT EXISTS continent (
   id char(3) PRIMARY KEY,
-  name varchar(200),
+  name varchar(13),
   geoid bigint UNIQUE
 );
 BEGIN TRANSACTION;
diff --git a/lib/postgres/host_ads.sql b/lib/postgres/host_ads.sql
deleted file mode 100644 (file)
index 55c5355..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-DROP TABLE IF EXISTS host_ads;
-CREATE TABLE IF NOT EXISTS host_ads (
-  host varchar(300) PRIMARY KEY
-);
-BEGIN TRANSACTION;
-DELETE FROM host_ads;
-COPY host_ads FROM PROGRAM 'curl -s http://pgl.yoyo.org/adservers/serverlist.php?hostformat=nohtml' WITH (format 'text', NULL ''); 
-COMMIT;
diff --git a/lib/postgres/hostads.sql b/lib/postgres/hostads.sql
new file mode 100644 (file)
index 0000000..d69bb3b
--- /dev/null
@@ -0,0 +1,8 @@
+DROP TABLE IF EXISTS hostads;
+CREATE TABLE IF NOT EXISTS hostads (
+  host varchar(50) PRIMARY KEY
+);
+BEGIN TRANSACTION;
+DELETE FROM hostads;
+COPY hostads FROM PROGRAM 'curl -s http://pgl.yoyo.org/adservers/serverlist.php?hostformat=nohtml' WITH (format 'text', NULL ''); 
+COMMIT;
index 3a166551241ace34280ba54d23334853948bbb2c..9af851c17c1d239fd737dd2c2e7ce63eaa50832c 100644 (file)
@@ -1,7 +1,7 @@
 DROP TABLE IF EXISTS lang;
 CREATE TABLE IF NOT EXISTS lang (
   id char(3) PRIMARY KEY,
-  name varchar(200)
+  name varchar(60)
 );
 GRANT ALL ON TABLE lang TO www;
 GRANT ALL ON TABLE lang TO nico;
index 694887b0cb5254fdc57fd5be50825109aa0721e0..4bc814176b3bed01be6cae1446afedd5559035db 100644 (file)
@@ -1,7 +1,7 @@
 DROP TABLE IF EXISTS timezone;
 CREATE TABLE IF NOT EXISTS timezone (
   id varchar(2),
-  name varchar(300),
+  name varchar(30),
   gmt decimal(3,1),
   dst decimal(3,1),
   raw decimal(3,1)