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);
|
2022-03-15 17:55:48 -06:00
|
|
|
our @EXPORT = qw();
|
2016-08-11 22:35:24 -04:00
|
|
|
|
2020-03-10 15:41:56 -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);
|
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,
|
|
|
|
PG_VERSION_13, PG_VERSION_14, PG_VERSION_15, PG_VERSION_16);
|
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;
|