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.
This commit is contained in:
Daniele Varrazzo 2012-11-13 14:02:45 +00:00
parent dd72e2ae99
commit 673a8ea100
3 changed files with 2 additions and 2 deletions

View File

@ -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;" >> $@;

View File

@ -3,4 +3,3 @@ comment = 're-organizes a PostgreSQL database'
default_version = '1.2dev0'
module_pathname = '$libdir/pg_repack'
relocatable = false
schema = repack

View File

@ -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;