1
0
mirror of https://github.com/prometheus-community/postgres_exporter.git synced 2025-08-12 14:02:47 +03:00

fixed version parsing for Windows and EnterpriseDB (#151)

* fixed version parsing for Windows and EnterpriseDB

* fixed formatting
This commit is contained in:
Marcin Budny
2018-02-02 02:24:07 +01:00
committed by Will Rouesnel
parent 5b9fea01ee
commit b0d5700ec0
2 changed files with 29 additions and 1 deletions

View File

@@ -80,7 +80,7 @@ func (cu *ColumnUsage) UnmarshalYAML(unmarshal func(interface{}) error) error {
}
// Regex used to get the "short-version" from the postgres version field.
var versionRegex = regexp.MustCompile(`^\w+ ((\d+)(\.\d+)?(\.\d+)?)\s`)
var versionRegex = regexp.MustCompile(`^\w+ ((\d+)(\.\d+)?(\.\d+)?)`)
var lowestSupportedVersion = semver.MustParse("9.1.0")
// Parses the version of postgres into the short version string we can use to