File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1024,9 +1024,9 @@ sub msg_en {
1024
1024
}
1025
1025
-x $PSQL or ndie msg(' opt-psql-noexec' , $PSQL );
1026
1026
$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 ;
1030
1030
$psql_revision =~ s /\D // g ;
1031
1031
1032
1032
$VERBOSE >= 2 and warn qq{ psql=$PSQL version=$psql_version \n } ;
@@ -1940,10 +1940,10 @@ sub run_command {
1940
1940
if ($db -> {error }) {
1941
1941
ndie $db -> {error };
1942
1942
}
1943
- if ($db -> {slurp } !~ / PostgreSQL (\d +\.\d +)/ ) {
1943
+ if ($db -> {slurp } !~ / ( PostgreSQL|EnterpriseDB) (\d +\.\d +)/ ) {
1944
1944
ndie msg(' die-badversion' , $db -> {slurp });
1945
1945
}
1946
- $db -> {version } = $1 ;
1946
+ $db -> {version } = $2 ;
1947
1947
$db -> {ok } = 0;
1948
1948
delete $arg -> {versiononly };
1949
1949
# # Remove this from the returned hash
@@ -3040,7 +3040,7 @@ sub check_connection {
3040
3040
3041
3041
$db = $info -> {db }[0];
3042
3042
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 : ' ' ;
3044
3044
3045
3045
$MRTG and do_mrtg({one => $ver ? 1 : 0});
3046
3046
You can’t perform that action at this time.
0 commit comments