1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2026-05-22 10:15:16 +02:00
Files
pgbackrest/test/lib/pgBackRestTest/Common/DbVersion.pm
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

65 lines
2.9 KiB
Perl
Raw Normal View History

2016-08-11 22:35:24 -04:00
####################################################################################################################################
# DB VERSION MODULE
####################################################################################################################################
2020-03-10 15:12:44 -04:00
package pgBackRestTest::Common::DbVersion;
2016-08-11 22:35:24 -04:00
use strict;
use warnings FATAL => qw(all);
use Carp qw(confess);
use Exporter qw(import);
our @EXPORT = qw();
2016-08-11 22:35:24 -04:00
use pgBackRestDoc::Common::Log;
2016-12-12 18:54:07 -05:00
2016-08-11 22:35:24 -04:00
####################################################################################################################################
# PostgreSQL version numbers
####################################################################################################################################
use constant PG_VERSION_94 => '9.4';
push @EXPORT, qw(PG_VERSION_94);
use constant PG_VERSION_95 => '9.5';
push @EXPORT, qw(PG_VERSION_95);
use constant PG_VERSION_96 => '9.6';
push @EXPORT, qw(PG_VERSION_96);
2017-09-01 12:29:34 -04:00
use constant PG_VERSION_10 => '10';
push @EXPORT, qw(PG_VERSION_10);
2018-06-05 08:59:17 -04:00
use constant PG_VERSION_11 => '11';
push @EXPORT, qw(PG_VERSION_11);
2019-09-27 09:35:59 -04:00
use constant PG_VERSION_12 => '12';
push @EXPORT, qw(PG_VERSION_12);
2020-05-21 13:46:16 -04:00
use constant PG_VERSION_13 => '13';
push @EXPORT, qw(PG_VERSION_13);
2021-05-24 17:17:03 -04:00
use constant PG_VERSION_14 => '14';
push @EXPORT, qw(PG_VERSION_14);
2022-05-04 11:55:59 -04:00
use constant PG_VERSION_15 => '15';
push @EXPORT, qw(PG_VERSION_15);
2023-04-27 10:30:50 +03:00
use constant PG_VERSION_16 => '16';
push @EXPORT, qw(PG_VERSION_16);
2024-04-18 10:56:24 +10:00
use constant PG_VERSION_17 => '17';
push @EXPORT, qw(PG_VERSION_17);
2016-08-11 22:35:24 -04:00
####################################################################################################################################
# versionSupport
#
# Returns an array of the supported Postgres versions.
####################################################################################################################################
sub versionSupport
{
# Assign function parameters, defaults, and log debug info
my ($strOperation) = logDebugParam(__PACKAGE__ . '->versionSupport');
2023-11-09 12:59:12 -03:00
my @strySupportVersion = (PG_VERSION_94, PG_VERSION_95, PG_VERSION_96, PG_VERSION_10, PG_VERSION_11, PG_VERSION_12,
2024-04-18 10:56:24 +10:00
PG_VERSION_13, PG_VERSION_14, PG_VERSION_15, PG_VERSION_16, PG_VERSION_17);
2016-08-11 22:35:24 -04:00
# Return from function and log return values if any
return logDebugReturn
(
$strOperation,
{name => 'strySupportVersion', value => \@strySupportVersion}
);
}
push @EXPORT, qw(versionSupport);
1;