Skip to content

Commit c865256

Browse files
authored
postgres: Fix connection string (#92)
1 parent f12556b commit c865256

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

postgres.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,6 @@ func newPostgres(host, port, user, password, dbname string, sslmode SSLMode) (*s
6363
}
6464

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

0 commit comments

Comments
 (0)