File: DbVersion.pm

package info (click to toggle)
pgbackrest 2.57.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 18,344 kB
  • sloc: ansic: 127,546; xml: 19,452; perl: 12,761; pascal: 3,279; sh: 91; sql: 32; makefile: 23
file content (64 lines) | stat: -rw-r--r-- 2,986 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
####################################################################################################################################
# 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_95                                          => '9.5';
    push @EXPORT, qw(PG_VERSION_95);
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_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, 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;