From: Nicolas Boisselier Date: Fri, 5 Jan 2018 14:21:20 +0000 (+0000) Subject: lib/postgres/continent.sql X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=9bc38f70bb70f647ce36f0c0e53dbe8e18d905ac;p=nb.git lib/postgres/continent.sql --- diff --git a/lib/postgres/continent.sql b/lib/postgres/continent.sql new file mode 100644 index 00000000..a296fabd --- /dev/null +++ b/lib/postgres/continent.sql @@ -0,0 +1,18 @@ +DROP TABLE IF EXISTS continent; +CREATE TABLE IF NOT EXISTS continent ( + id char(3) PRIMARY KEY, + name varchar(200) +); +GRANT ALL ON TABLE continent TO www; +GRANT ALL ON TABLE continent TO nico; +GRANT ALL ON TABLE continent TO root; +BEGIN TRANSACTION; +DELETE FROM continent; +INSERT INTO continent VALUES ('AF','Africa'); +INSERT INTO continent VALUES ('AS','Asia'); +INSERT INTO continent VALUES ('EU','Europe'); +INSERT INTO continent VALUES ('NA','North America'); +INSERT INTO continent VALUES ('OC','Oceania'); +INSERT INTO continent VALUES ('SA','South America'); +INSERT INTO continent VALUES ('AN','Antarctica'); +COMMIT;