2016-08-12 04:35:24 +02:00
|
|
|
####################################################################################################################################
|
|
|
|
# DB VERSION MODULE
|
|
|
|
####################################################################################################################################
|
2020-03-10 21:12:44 +02:00
|
|
|
package pgBackRestTest::Common::DbVersion;
|
2016-08-12 04:35:24 +02:00
|
|
|
|
|
|
|
use strict;
|
|
|
|
use warnings FATAL => qw(all);
|
|
|
|
use Carp qw(confess);
|
|
|
|
|
|
|
|
use Exporter qw(import);
|
2022-03-16 01:55:48 +02:00
|
|
|
our @EXPORT = qw();
|
2016-08-12 04:35:24 +02:00
|
|
|
|
2020-03-10 21:41:56 +02:00
|
|
|
use pgBackRestDoc::Common::Log;
|
2016-12-13 01:54:07 +02:00
|
|
|
|
2016-08-12 04:35:24 +02:00
|
|
|
####################################################################################################################################
|
|
|
|
# PostgreSQL version numbers
|
|
|
|
####################################################################################################################################
|
|
|
|
use constant PG_VERSION_90 => '9.0';
|
|
|
|
push @EXPORT, qw(PG_VERSION_90);
|
|
|
|
use constant PG_VERSION_91 => '9.1';
|
|
|
|
push @EXPORT, qw(PG_VERSION_91);
|
|
|
|
use constant PG_VERSION_92 => '9.2';
|
|
|
|
push @EXPORT, qw(PG_VERSION_92);
|
|
|
|
use constant PG_VERSION_93 => '9.3';
|
|
|
|
push @EXPORT, qw(PG_VERSION_93);
|
|
|
|
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 18:29:34 +02:00
|
|
|
use constant PG_VERSION_10 => '10';
|
|
|
|
push @EXPORT, qw(PG_VERSION_10);
|
2018-06-05 14:59:17 +02:00
|
|
|
use constant PG_VERSION_11 => '11';
|
|
|
|
push @EXPORT, qw(PG_VERSION_11);
|
2019-09-27 15:35:59 +02:00
|
|
|
use constant PG_VERSION_12 => '12';
|
|
|
|
push @EXPORT, qw(PG_VERSION_12);
|
2020-05-21 19:46:16 +02:00
|
|
|
use constant PG_VERSION_13 => '13';
|
|
|
|
push @EXPORT, qw(PG_VERSION_13);
|
2021-05-24 23:17:03 +02:00
|
|
|
use constant PG_VERSION_14 => '14';
|
|
|
|
push @EXPORT, qw(PG_VERSION_14);
|
2022-05-04 17:55:59 +02:00
|
|
|
use constant PG_VERSION_15 => '15';
|
|
|
|
push @EXPORT, qw(PG_VERSION_15);
|
2016-08-12 04:35:24 +02:00
|
|
|
|
2016-08-24 18:39:27 +02:00
|
|
|
use constant PG_VERSION_HOT_STANDBY => PG_VERSION_91;
|
|
|
|
push @EXPORT, qw(PG_VERSION_HOT_STANDBY);
|
|
|
|
use constant PG_VERSION_BACKUP_STANDBY => PG_VERSION_92;
|
|
|
|
push @EXPORT, qw(PG_VERSION_BACKUP_STANDBY);
|
|
|
|
|
2016-08-12 04:35:24 +02: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');
|
|
|
|
|
2022-01-06 22:34:04 +02:00
|
|
|
my @strySupportVersion = (PG_VERSION_90, PG_VERSION_91, PG_VERSION_92, PG_VERSION_93, PG_VERSION_94, PG_VERSION_95,
|
2022-05-04 17:55:59 +02:00
|
|
|
PG_VERSION_96, PG_VERSION_10, PG_VERSION_11, PG_VERSION_12, PG_VERSION_13, PG_VERSION_14,
|
|
|
|
PG_VERSION_15);
|
2016-08-12 04:35:24 +02:00
|
|
|
|
|
|
|
# Return from function and log return values if any
|
|
|
|
return logDebugReturn
|
|
|
|
(
|
|
|
|
$strOperation,
|
|
|
|
{name => 'strySupportVersion', value => \@strySupportVersion}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
push @EXPORT, qw(versionSupport);
|
|
|
|
|
|
|
|
1;
|