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 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
REL_14_STABLE
Tom Lane 1 year ago
parent c1fff7b1b3
commit 256e34653a
  1. 1
      src/pl/plperl/GNUmakefile
  2. 3
      src/pl/plperl/input/plperl_env.source
  3. 2
      src/pl/plperl/output/plperl_env.source

@ -124,6 +124,7 @@ submake:
clean distclean maintainer-clean: clean-lib clean distclean maintainer-clean: clean-lib
rm -f SPI.c Util.c $(OBJS) perlchunks.h plperl_opmask.h rm -f SPI.c Util.c $(OBJS) perlchunks.h plperl_opmask.h
rm -f sql/plperl_env.sql expected/plperl_env.out
rm -rf $(pg_regress_clean_files) rm -rf $(pg_regress_clean_files)
ifeq ($(PORTNAME), win32) ifeq ($(PORTNAME), win32)
rm -f $(perlwithver).def rm -f $(perlwithver).def

@ -50,3 +50,6 @@ $$
} }
$$ LANGUAGE plperl; $$ LANGUAGE plperl;
-- clean up to simplify cross-version upgrade testing
DROP FUNCTION get_environ();

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

Loading…
Cancel
Save