Drop function in the tests on a never version

As dropping the function now relies on pg_dist_object, which exists with 9.0+
pull/5749/head
Onder Kalaci 2022-03-01 18:10:27 +01:00 committed by Önder Kalacı
parent a4133c69e8
commit b79a0052a4
2 changed files with 57 additions and 58 deletions

View File

@ -1115,8 +1115,7 @@ HINT: Use DROP FUNCTION relation_is_a_known_shard(regclass) first.
SET citus.enable_version_checks TO 'false';
SET columnar.enable_version_checks TO 'false';
-- This will fail because of previous function declaration
ALTER EXTENSION citus UPDATE TO '8.1-1';
NOTICE: version "8.1-1" of extension "citus" is already installed
ALTER EXTENSION citus UPDATE TO '9.1-1';
-- We can DROP problematic function and continue ALTER EXTENSION even when version checks are on
SET citus.enable_version_checks TO 'true';
SET columnar.enable_version_checks TO 'true';
@ -1125,8 +1124,8 @@ ERROR: cannot drop function relation_is_a_known_shard(regclass) because extensi
HINT: You can drop extension citus instead.
SET citus.enable_version_checks TO 'false';
SET columnar.enable_version_checks TO 'false';
ALTER EXTENSION citus UPDATE TO '8.1-1';
NOTICE: version "8.1-1" of extension "citus" is already installed
ALTER EXTENSION citus UPDATE TO '9.1-1';
NOTICE: version "9.1-1" of extension "citus" is already installed
-- Test updating to the latest version without specifying the version number
ALTER EXTENSION citus UPDATE;
-- re-create in newest version

View File

@ -526,7 +526,7 @@ $function$;
SET citus.enable_version_checks TO 'false';
SET columnar.enable_version_checks TO 'false';
-- This will fail because of previous function declaration
ALTER EXTENSION citus UPDATE TO '8.1-1';
ALTER EXTENSION citus UPDATE TO '9.1-1';
-- We can DROP problematic function and continue ALTER EXTENSION even when version checks are on
SET citus.enable_version_checks TO 'true';
@ -535,7 +535,7 @@ DROP FUNCTION pg_catalog.relation_is_a_known_shard(regclass);
SET citus.enable_version_checks TO 'false';
SET columnar.enable_version_checks TO 'false';
ALTER EXTENSION citus UPDATE TO '8.1-1';
ALTER EXTENSION citus UPDATE TO '9.1-1';
-- Test updating to the latest version without specifying the version number
ALTER EXTENSION citus UPDATE;