Skip to content

Commit 0bd9560

Browse files
committed
Fix cross-version upgrade tests.
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 b7e3a52 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
1 parent 9f97c31 commit 0bd9560

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

src/pl/plperl/GNUmakefile

+1
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ submake:
124124

125125
clean distclean maintainer-clean: clean-lib
126126
rm -f SPI.c Util.c $(OBJS) perlchunks.h plperl_opmask.h
127+
rm -f sql/plperl_env.sql expected/plperl_env.out
127128
rm -rf $(pg_regress_clean_files)
128129
ifeq ($(PORTNAME), win32)
129130
rm -f $(perlwithver).def

src/pl/plperl/input/plperl_env.source

+3
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,6 @@ $$
5050
}
5151

5252
$$ LANGUAGE plperl;
53+
54+
-- clean up to simplify cross-version upgrade testing
55+
DROP FUNCTION get_environ();

src/pl/plperl/output/plperl_env.source

+2
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,5 @@ $$
4747
$$ LANGUAGE plperl;
4848
WARNING: attempted alteration of $ENV{TEST_PLPERL_ENV_FOO} at line 12.
4949
NOTICE: environ unaffected
50+
-- clean up to simplify cross-version upgrade testing
51+
DROP FUNCTION get_environ();

0 commit comments

Comments
 (0)