Previously, pg_upgrade failed due to the permission denied because the pg_ivm_immv catalog was in the pg_catalog catalog (Issue #79). To fix this, all objects created by pg_ivm are moved to theschema pgivm, which is also created by pg_ivm. pg_ivm is still not relocatable and this must be installed to the pgivm schema because the catalog and some internal functions are referred to unqualified by the schema name from the pg_ivm module. In future, this might be able to relocatable during installation, though. This commit affects compatibility with previous releases. To allow to access objects like create_immv function as previous, you need to qualify them with the schema name or setup search_path properly.
16 lines
638 B
SQL
16 lines
638 B
SQL
-- create a new schema pgivm and change the objects' schema to it
|
|
CREATE SCHEMA pgivm;
|
|
|
|
ALTER TABLE pg_ivm_immv SET SCHEMA pgivm;
|
|
ALTER FUNCTION create_immv(text, text) SET SCHEMA pgivm;
|
|
ALTER FUNCTION refresh_immv(text, bool) SET SCHEMA pgivm;
|
|
ALTER FUNCTION get_immv_def(regclass) SET SCHEMA pgivm;
|
|
ALTER FUNCTION ivm_visible_in_prestate(oid, tid, oid) SET SCHEMA pgivm;
|
|
ALTER FUNCTION "IVM_immediate_before"() SET SCHEMA pgivm;
|
|
ALTER FUNCTION "IVM_immediate_maintenance"() SET SCHEMA pgivm;
|
|
ALTER FUNCTION "IVM_prevent_immv_change"() SET SCHEMA pgivm;
|
|
|
|
GRANT USAGE ON SCHEMA pgivm TO PUBLIC;
|
|
|
|
-- drop a garbage
|
|
DROP SCHEMA __pg_ivm__;
|