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_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);
|
2023-04-27 09:30:50 +02:00
|
|
|
use constant PG_VERSION_16 => '16';
|
|
|
|
push @EXPORT, qw(PG_VERSION_16);
|
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');
|
|
|
|
|
2023-11-09 17:59:12 +02: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-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;
|