1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2026-04-28 21:04:55 +02:00
Files
pgbackrest/test/lib/pgBackRestTest/Common/DbVersion.pm
T
David Steele 5171e8bde3 Remove support for PostgreSQL 9.5.
Per our policy to support five EOL versions of PostgreSQL, 9.5 is no longer supported by pgBackRest. Remove all logic associated with 9.5 and update the tests.

An effort was made to advance versions as much as possible in the tests while still providing coverage. Hopefully this will reduce churn when future versions expire, though it has created a bit more here.

Tests for 9.4/9.5 are left in the expire/info tests to demonstrate that these commands work with old versions present.
2025-11-07 10:01:50 +02:00

63 lines
2.8 KiB
Perl

####################################################################################################################################
# DB VERSION MODULE
####################################################################################################################################
package pgBackRestTest::Common::DbVersion;
use strict;
use warnings FATAL => qw(all);
use Carp qw(confess);
use Exporter qw(import);
our @EXPORT = qw();
use pgBackRestDoc::Common::Log;
####################################################################################################################################
# PostgreSQL version numbers
####################################################################################################################################
use constant PG_VERSION_96 => '9.6';
push @EXPORT, qw(PG_VERSION_96);
use constant PG_VERSION_10 => '10';
push @EXPORT, qw(PG_VERSION_10);
use constant PG_VERSION_11 => '11';
push @EXPORT, qw(PG_VERSION_11);
use constant PG_VERSION_12 => '12';
push @EXPORT, qw(PG_VERSION_12);
use constant PG_VERSION_13 => '13';
push @EXPORT, qw(PG_VERSION_13);
use constant PG_VERSION_14 => '14';
push @EXPORT, qw(PG_VERSION_14);
use constant PG_VERSION_15 => '15';
push @EXPORT, qw(PG_VERSION_15);
use constant PG_VERSION_16 => '16';
push @EXPORT, qw(PG_VERSION_16);
use constant PG_VERSION_17 => '17';
push @EXPORT, qw(PG_VERSION_17);
use constant PG_VERSION_18 => '18';
push @EXPORT, qw(PG_VERSION_18);
####################################################################################################################################
# versionSupport
#
# Returns an array of the supported Postgres versions.
####################################################################################################################################
sub versionSupport
{
# Assign function parameters, defaults, and log debug info
my ($strOperation) = logDebugParam(__PACKAGE__ . '->versionSupport');
my @strySupportVersion = (PG_VERSION_96, PG_VERSION_10, PG_VERSION_11, PG_VERSION_12, PG_VERSION_13, PG_VERSION_14,
PG_VERSION_15, PG_VERSION_16, PG_VERSION_17, PG_VERSION_18);
# Return from function and log return values if any
return logDebugReturn
(
$strOperation,
{name => 'strySupportVersion', value => \@strySupportVersion}
);
}
push @EXPORT, qw(versionSupport);
1;