Fix cross-version upgrade tests.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 11 Nov 2024 18:57:21 +0000 (13:57 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 11 Nov 2024 18:57:21 +0000 (13:57 -0500)
TestUpgradeXversion knows how to make the main regression database's
references to pg_regress.so be version-independent.  But it doesn't
do that for plperl's database, so that the C function added by
commit b7e3a52a8 is causing cross-version upgrade test failures.
Path of least resistance is to just drop the function at the end
of the new test.

In <= v14, also take the opportunity to clean up the generated
test files.

Security: CVE-2024-10979

src/pl/plperl/expected/plperl_env.out
src/pl/plperl/sql/plperl_env.sql

index 328a53634211541f2a8ee792d8a7ead7d75f8c5c..f777c072b569057b6962390c7de39e7321d92c8d 100644 (file)
@@ -51,3 +51,5 @@ $$
 $$ LANGUAGE plperl;
 WARNING:  attempted alteration of $ENV{TEST_PLPERL_ENV_FOO} at line 12.
 NOTICE:  environ unaffected
+-- clean up to simplify cross-version upgrade testing
+DROP FUNCTION get_environ();
index 4108f392d1dcb7c1c7a7275e44ce797842f079a9..fa5f04146cccb9bab8f1e9b6f144c7e36310f825 100644 (file)
@@ -56,3 +56,6 @@ $$
    }
 
 $$ LANGUAGE plperl;
+
+-- clean up to simplify cross-version upgrade testing
+DROP FUNCTION get_environ();