summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Paquier2024-07-02 00:47:16 +0000
committerMichael Paquier2024-07-02 00:47:16 +0000
commit0c1aca461481216ff5a0e65538c4880bcf346433 (patch)
tree0e15b5a00a6052ccd3cdd142f0369b4de442c7d0 /src
parent978f38c771fb3a19fdd5cb73cb662441eb9e551c (diff)
Cleanup perl code from unused variables and routines
This commit removes unused variables and routines from some perl code that have accumulated across the years. This touches the following areas: - Wait event generation script. - AdjustUpgrade.pm. - TAP perl code Author: Alexander Lakhin Reviewed-by: Dagfinn Ilmari Mannsåker Discussion: https://postgr.es/m/70b340bc-244a-589d-ef8b-d8aebb707a84@gmail.com
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/activity/generate-wait_event_types.pl2
-rw-r--r--src/bin/pg_dump/t/003_pg_dump_with_server.pl1
-rw-r--r--src/bin/pg_dump/t/005_pg_dump_filterfile.pl1
-rw-r--r--src/test/modules/ldap_password_func/t/001_mutated_bindpasswd.pl4
-rw-r--r--src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl1
-rw-r--r--src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm1
-rw-r--r--src/test/recovery/t/021_row_visibility.pl1
-rw-r--r--src/test/recovery/t/032_relfilenode_reuse.pl1
-rw-r--r--src/test/recovery/t/035_standby_logical_decoding.pl5
9 files changed, 1 insertions, 16 deletions
diff --git a/src/backend/utils/activity/generate-wait_event_types.pl b/src/backend/utils/activity/generate-wait_event_types.pl
index 6a9c0a5d347..2f2fa5bb8f4 100644
--- a/src/backend/utils/activity/generate-wait_event_types.pl
+++ b/src/backend/utils/activity/generate-wait_event_types.pl
@@ -42,8 +42,6 @@ my @abi_compatibility_lines;
my @lines;
my $abi_compatibility = 0;
my $section_name;
-my $note;
-my $note_name;
# Remove comments and empty lines and add waitclassname based on the section
while (<$wait_event_names>)
diff --git a/src/bin/pg_dump/t/003_pg_dump_with_server.pl b/src/bin/pg_dump/t/003_pg_dump_with_server.pl
index b5a14455507..3f549f44e75 100644
--- a/src/bin/pg_dump/t/003_pg_dump_with_server.pl
+++ b/src/bin/pg_dump/t/003_pg_dump_with_server.pl
@@ -26,7 +26,6 @@ $node->safe_psql('postgres', "CREATE SERVER s1 FOREIGN DATA WRAPPER dummy");
$node->safe_psql('postgres', "CREATE SERVER s2 FOREIGN DATA WRAPPER dummy");
$node->safe_psql('postgres', "CREATE FOREIGN TABLE t0 (a int) SERVER s0");
$node->safe_psql('postgres', "CREATE FOREIGN TABLE t1 (a int) SERVER s1");
-my ($cmd, $stdout, $stderr, $result);
command_fails_like(
[ "pg_dump", '-p', $port, '--include-foreign-data=s0', 'postgres' ],
diff --git a/src/bin/pg_dump/t/005_pg_dump_filterfile.pl b/src/bin/pg_dump/t/005_pg_dump_filterfile.pl
index a80e13a0d36..6025bb296cc 100644
--- a/src/bin/pg_dump/t/005_pg_dump_filterfile.pl
+++ b/src/bin/pg_dump/t/005_pg_dump_filterfile.pl
@@ -81,7 +81,6 @@ $node->safe_psql('sourcedb',
#
# Test interaction of correctly specified filter file
#
-my ($cmd, $stdout, $stderr, $result);
# Empty filterfile
open $inputfile, '>', "$tempdir/inputfile.txt"
diff --git a/src/test/modules/ldap_password_func/t/001_mutated_bindpasswd.pl b/src/test/modules/ldap_password_func/t/001_mutated_bindpasswd.pl
index b990e7d101e..82b1cb88e9f 100644
--- a/src/test/modules/ldap_password_func/t/001_mutated_bindpasswd.pl
+++ b/src/test/modules/ldap_password_func/t/001_mutated_bindpasswd.pl
@@ -12,10 +12,6 @@ use Test::More;
use lib "$FindBin::RealBin/../../../ldap";
use LdapServer;
-my ($slapd, $ldap_bin_dir, $ldap_schema_dir);
-
-$ldap_bin_dir = undef; # usually in PATH
-
if ($ENV{with_ldap} ne 'yes')
{
plan skip_all => 'LDAP not supported by this build';
diff --git a/src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl b/src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl
index 7a63539f39c..f71d0ff3e05 100644
--- a/src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl
+++ b/src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl
@@ -15,7 +15,6 @@ unless (($ENV{with_ssl} || "") eq 'openssl')
plan skip_all => 'OpenSSL not supported by this build';
}
-my $clearpass = "FooBaR1";
my $rot13pass = "SbbOnE1";
# see the Makefile for how the certificate and key have been generated
diff --git a/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm b/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm
index 3cec72d9d4f..239c17aced9 100644
--- a/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm
+++ b/src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm
@@ -534,7 +534,6 @@ sub _mash_view_qualifiers
{
my @thischunks = split /;/, $chunk, 2;
my $stmt = shift(@thischunks);
- my $ostmt = $stmt;
# now $stmt is just the body of the CREATE [MATERIALIZED] VIEW
$stmt =~ s/$qualifier\.//g;
diff --git a/src/test/recovery/t/021_row_visibility.pl b/src/test/recovery/t/021_row_visibility.pl
index 255caffb19d..d0461376014 100644
--- a/src/test/recovery/t/021_row_visibility.pl
+++ b/src/test/recovery/t/021_row_visibility.pl
@@ -168,7 +168,6 @@ $node_standby->stop;
sub send_query_and_wait
{
my ($psql, $query, $untl) = @_;
- my $ret;
# send query
$$psql{stdin} .= $query;
diff --git a/src/test/recovery/t/032_relfilenode_reuse.pl b/src/test/recovery/t/032_relfilenode_reuse.pl
index 96a8104b802..d473cd167c1 100644
--- a/src/test/recovery/t/032_relfilenode_reuse.pl
+++ b/src/test/recovery/t/032_relfilenode_reuse.pl
@@ -205,7 +205,6 @@ sub cause_eviction
sub send_query_and_wait
{
my ($psql, $query, $untl) = @_;
- my $ret;
# For each query we run, we'll restart the timeout. Otherwise the timeout
# would apply to the whole test script, and would need to be set very high
diff --git a/src/test/recovery/t/035_standby_logical_decoding.pl b/src/test/recovery/t/035_standby_logical_decoding.pl
index 4628f9fb806..4185b803b25 100644
--- a/src/test/recovery/t/035_standby_logical_decoding.pl
+++ b/src/test/recovery/t/035_standby_logical_decoding.pl
@@ -10,10 +10,7 @@ use PostgreSQL::Test::Cluster;
use PostgreSQL::Test::Utils;
use Test::More;
-my ($stdin, $stdout, $stderr,
- $cascading_stdout, $cascading_stderr, $subscriber_stdin,
- $subscriber_stdout, $subscriber_stderr, $ret,
- $handle, $slot);
+my ($stdout, $stderr, $cascading_stdout, $cascading_stderr, $handle);
my $node_primary = PostgreSQL::Test::Cluster->new('primary');
my $node_standby = PostgreSQL::Test::Cluster->new('standby');