File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -102,15 +102,15 @@ func (cu *ColumnUsage) UnmarshalYAML(unmarshal func(interface{}) error) error {
102102}
103103
104104// Regex used to get the "short-version" from the postgres version field.
105- var versionRegex = regexp .MustCompile (`^\w+ (\d+\.\d+\.\d+)` )
105+ var versionRegex = regexp .MustCompile (`^\w+ (( \d+)( \.\d+)?( \.\d+)?)\s ` )
106106var lowestSupportedVersion = semver .MustParse ("9.1.0" )
107107
108108// Parses the version of postgres into the short version string we can use to
109109// match behaviors.
110110func parseVersion (versionString string ) (semver.Version , error ) {
111111submatches := versionRegex .FindStringSubmatch (versionString )
112112if len (submatches ) > 1 {
113- return semver .Make (submatches [1 ])
113+ return semver .ParseTolerant (submatches [1 ])
114114}
115115return semver.Version {},
116116errors .New (fmt .Sprintln ("Could not find a postgres version in string:" , versionString ))
You can’t perform that action at this time.
0 commit comments