diff --git a/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm b/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm index 856a898f2d4..2692889d862 100644 --- a/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm +++ b/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm @@ -98,25 +98,6 @@ sub adjust_database_contents 'drop extension if exists test_ext7'); } - # We can no longer upgrade bpchar indexes that claim deduplication ability - # (amcheck will complain about them), so drop them if source is pre-v14. - if ($old_version < 14) - { - if ($dbnames{"regression"}) - { - _add_st($result, 'regression', - 'drop index if exists public.hslot_hubname', - 'drop index if exists public.hslot_name', - 'drop index if exists public.hub_name', - 'drop index if exists public.iface_name', - 'drop index if exists public.phone_name', - 'drop index if exists public.pline_name', - 'drop index if exists public.pslot_name', - 'drop index if exists public.room_rno', - 'drop index if exists public.wslot_name'); - } - } - # stuff not supported from release 14 if ($old_version < 14) { @@ -150,6 +131,22 @@ sub adjust_database_contents _add_st($result, 'contrib_regression_seg', "delete from test_seg where s = '4.6 .. ~7.0'"); } + + # We can no longer upgrade bpchar indexes that claim deduplication + # ability (amcheck will complain about them) + if ($dbnames{'regression'}) + { + _add_st($result, 'regression', + 'drop index if exists public.hslot_hubname', + 'drop index if exists public.hslot_name', + 'drop index if exists public.hub_name', + 'drop index if exists public.iface_name', + 'drop index if exists public.phone_name', + 'drop index if exists public.pline_name', + 'drop index if exists public.pslot_name', + 'drop index if exists public.room_rno', + 'drop index if exists public.wslot_name'); + } } # user table OIDs are gone from release 12 on @@ -293,6 +290,17 @@ sub adjust_old_dumpfile {$1;}mxg; } + if ($old_version < 14) + { + # Fix up some rule definitions that ruleutils now prints with AS. + $dump =~ s {DO INSTEAD UPDATE public\.rules_log trgt SET tag} + {DO INSTEAD UPDATE public.rules_log AS trgt SET tag}; + $dump =~ s {UPDATE public\.int4_tbl trgt_1 SET} + {UPDATE public.int4_tbl AS trgt_1 SET}; + $dump =~ s {DELETE FROM public\.int4_tbl trgt_1} + {DELETE FROM public.int4_tbl AS trgt_1}; + } + # Change trigger definitions to say ... EXECUTE FUNCTION ... if ($old_version < 12) {