Skip to content

Commit d27b885

Browse files
FIX (postgresql): Fix version detection without minor version after major
1 parent 45054bc commit d27b885

File tree

1 file changed

+2
-1
lines changed
  • backend/internal/features/databases/databases/postgresql

1 file changed

+2
-1
lines changed

backend/internal/features/databases/databases/postgresql/model.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,8 @@ func verifyDatabaseVersion(
551551
}
552552

553553
// Parse version from string like "PostgreSQL 14.2 on x86_64-pc-linux-gnu..."
554-
re := regexp.MustCompile(`PostgreSQL (\d+)\.`)
554+
// or "PostgreSQL 16 maintained by Postgre BY..." (some builds omit minor version)
555+
re := regexp.MustCompile(`PostgreSQL (\d+)`)
555556
matches := re.FindStringSubmatch(versionStr)
556557
if len(matches) < 2 {
557558
return fmt.Errorf("could not parse version from: %s", versionStr)

0 commit comments

Comments
 (0)