Skip to content

Commit 16581a8

Browse files
author
Sivakumar Krishnamurthy
committed
First step towards making it EDB compatabile
1 parent 0aa247a commit 16581a8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

check_postgres.pl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,9 +1024,9 @@ sub msg_en {
10241024
}
10251025
-x $PSQL or ndie msg('opt-psql-noexec', $PSQL);
10261026
$res = qx{$PSQL --version};
1027-
$res =~ /^psql \(PostgreSQL\) (\d+\.\d+)(\S*)/ or ndie msg('opt-psql-nover');
1028-
our $psql_version = $1;
1029-
our $psql_revision = $2;
1027+
$res =~ /((?:^edb\-)?psql) (\(PostgreSQL\)|EnterpriseDB) (\d+\.\d+)(\S*)/ or ndie msg('opt-psql-nover');
1028+
our $psql_version = $3;
1029+
our $psql_revision = $4;
10301030
$psql_revision =~ s/\D//g;
10311031

10321032
$VERBOSE >= 2 and warn qq{psql=$PSQL version=$psql_version\n};
@@ -1940,10 +1940,10 @@ sub run_command {
19401940
if ($db->{error}) {
19411941
ndie $db->{error};
19421942
}
1943-
if ($db->{slurp} !~ /PostgreSQL (\d+\.\d+)/) {
1943+
if ($db->{slurp} !~ /(PostgreSQL|EnterpriseDB) (\d+\.\d+)/) {
19441944
ndie msg('die-badversion', $db->{slurp});
19451945
}
1946-
$db->{version} = $1;
1946+
$db->{version} = $2;
19471947
$db->{ok} = 0;
19481948
delete $arg->{versiononly};
19491949
## Remove this from the returned hash
@@ -3040,7 +3040,7 @@ sub check_connection {
30403040

30413041
$db = $info->{db}[0];
30423042

3043-
my $ver = ($db->{slurp}[0]{v} =~ /PostgreSQL (\d+\.\d+\S+)/o) ? $1 : '';
3043+
my $ver = ($db->{slurp}[0]{v} =~ /(PostgreSQL|EnterpriseDB) (\d+\.\d+\S+)/o) ? $2 : '';
30443044

30453045
$MRTG and do_mrtg({one => $ver ? 1 : 0});
30463046

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy