From 673a8ea10091f35af81cf56f6e2cb2fe205c9d55 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Tue, 13 Nov 2012 14:02:45 +0000 Subject: [PATCH] The repack schema is contained in the pg_repack extension ...not the other way around. This allows DROP EXTENSION ... CASCADE to remove temporary directories, simplifying the cleanup procedure after an error, and getting rid of the schema on uninstall. --- lib/Makefile | 1 - lib/pg_repack.control | 1 - lib/pg_repack.sql.in | 2 ++ 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Makefile b/lib/Makefile index db853ba..135daff 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -46,7 +46,6 @@ LIBS := $(filter-out -lxslt, $(LIBS)) pg_repack.sql: pg_repack.sql.in echo "BEGIN;\n" > $@; \ - echo "CREATE SCHEMA repack;\n" >> $@; \ sed 's,MODULE_PATHNAME,$$libdir/$(MODULE_big),g' $< >> $@; \ echo "\nCOMMIT;" >> $@; diff --git a/lib/pg_repack.control b/lib/pg_repack.control index 805a182..2f15b91 100644 --- a/lib/pg_repack.control +++ b/lib/pg_repack.control @@ -3,4 +3,3 @@ comment = 're-organizes a PostgreSQL database' default_version = '1.2dev0' module_pathname = '$libdir/pg_repack' relocatable = false -schema = repack diff --git a/lib/pg_repack.sql.in b/lib/pg_repack.sql.in index c852fb4..893ffb8 100644 --- a/lib/pg_repack.sql.in +++ b/lib/pg_repack.sql.in @@ -6,6 +6,8 @@ * Portions Copyright (c) 2012, The Reorg Development Team */ +CREATE SCHEMA repack; + CREATE FUNCTION repack.version() RETURNS text AS 'MODULE_PATHNAME', 'repack_version' LANGUAGE C IMMUTABLE STRICT;