X-Git-Url: https://git.tokkee.org/?p=postrr.git;a=blobdiff_plain;f=src%2Fpostrr.sql.in;h=34d125773fa4da1cacc7864657899956af5ee41a;hp=a3bff336ae94ef5288b4ab927a7a3c4704359d83;hb=7e1366eab3849806ee6c671dcb3174814c98f198;hpb=25f71c21c10c5dcb6c8a8ebf20987becf424b867 diff --git a/src/postrr.sql.in b/src/postrr.sql.in index a3bff33..34d1257 100644 --- a/src/postrr.sql.in +++ b/src/postrr.sql.in @@ -27,10 +27,8 @@ -- PostRR - PostgreSQL Round-Robin Extension -- --- suppress messages like 'return type foo is only a shell' -SET client_min_messages TO WARNING; - -BEGIN; +-- complain if script is sourced in psql, rather than via CREATE EXTENSION +\echo Use "CREATE EXTENSION postrr" to load this file. \quit CREATE SCHEMA postrr; @@ -45,6 +43,8 @@ CREATE TABLE postrr.rrtimeslices ( tsnum integer NOT NULL ); +SELECT pg_catalog.pg_extension_config_dump('postrr.rrtimeslices', ''); + CREATE TABLE postrr.rrarchives ( rraname text NOT NULL, tbl name NOT NULL, @@ -53,6 +53,8 @@ CREATE TABLE postrr.rrarchives ( UNIQUE (rraname, tbl, tscol, vcol) ); +SELECT pg_catalog.pg_extension_config_dump('postrr.rrarchives', ''); + CREATE OR REPLACE FUNCTION PostRR_Version() RETURNS cstring AS 'postrr-@POSTRR_MAJOR_VERSION@.@POSTRR_MINOR_VERSION@', 'postrr_version' @@ -408,9 +410,5 @@ BEGIN END; $$; -COMMIT; - -SET client_min_messages TO DEFAULT; - -- vim: set tw=78 sw=4 ts=4 noexpandtab :