diff --git a/src/postrr.sql.in b/src/postrr.sql.in
index a3bff336ae94ef5288b4ab927a7a3c4704359d83..34d125773fa4da1cacc7864657899956af5ee41a 100644 (file)
--- a/src/postrr.sql.in
+++ b/src/postrr.sql.in
-- 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;
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,
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'
END;
$$;
-COMMIT;
-
-SET client_min_messages TO DEFAULT;
-
-- vim: set tw=78 sw=4 ts=4 noexpandtab :