Skip to content

Commit

Permalink
Revert "postgres: Fix connection string (metal-stack#92)"
Browse files Browse the repository at this point in the history
This reverts commit c865256.
  • Loading branch information
ralfonso committed Feb 15, 2023
1 parent 161f882 commit dc64521
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,5 @@ func newPostgres(host, port, user, password, dbname string, sslmode SSLMode) (*s
}

func dataSource(host, port, user, password, dbname string, sslmode SSLMode) string {
return fmt.Sprintf("host=%s user=%s password=%s dbname=%s port=%s %s",
host, user, password, dbname, port, sslmode)
return fmt.Sprintf("postgres://%s:%s@%s:%s/%s?%s", user, password, host, port, dbname, sslmode)
}

0 comments on commit dc64521

Please sign in to comment.