From 05a59598b187dc56f9c427d44baa873cca578931 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 14 May 2024 21:15:04 +0200 Subject: Merging upstream version 260. Signed-off-by: Daniel Baumann --- t/020_create_sql_remove.t | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 't/020_create_sql_remove.t') diff --git a/t/020_create_sql_remove.t b/t/020_create_sql_remove.t index d208b99..aa2bcaa 100644 --- a/t/020_create_sql_remove.t +++ b/t/020_create_sql_remove.t @@ -292,19 +292,16 @@ tel|2 } # Check PL/Python3 (untrusted) - if ($v >= '9.1') { + SKIP: { + skip "Skipping PL/Python3 test for version $v...", 6 if ($v < 9.1); + my $pyver = `python3 --version 2>/dev/null`; + chomp $pyver; + skip "$pyver is too new for PL/Python3 on $v...", 6 if ($v < 10 and $pyver and $pyver =~ /3\.1[1-9]/); # distutils removed in Python 3.12 is_program_out 'postgres', create_extension($v, 'plpython3u'), 0, '', 'CREATE EXTENSION plpython3u succeeds for user postgres'; is_program_out 'postgres', 'psql nobodydb -qc "CREATE FUNCTION capitalize3(text) RETURNS text AS \'import sys; return args[0].capitalize() + sys.version[0]\' LANGUAGE plpython3u;"', 0, '', 'creating PL/Python3 function as user postgres succeeds'; is_program_out 'nobody', 'psql nobodydb -Atc "select capitalize3(\'foo\')"', 0, "Foo3\n", 'calling PL/Python function'; - } else { - pass "Skipping PL/Python3 test for version $v..."; - pass '...'; - pass '...'; - pass '...'; - pass '...'; - pass '...'; } # Check PL/Tcl (trusted/untrusted) -- cgit v1.2.3