fix: usage with postgres over unix socket #1308

Merged
konrad merged 2 commits from fix/postgresql-socket into main 2022-11-04 12:25:10 +00:00
1 changed files with 1 additions and 0 deletions
Showing only changes of commit 965f537277 - Show all commits

View File

@ -148,6 +148,7 @@ func parsePostgreSQLHostPort(info string) (string, string) {
return host, port
}
// Copied and adopted from https://github.com/go-gitea/gitea/blob/f337c32e868381c6d2d948221aca0c59f8420c13/modules/setting/database.go#L176-L186
func getPostgreSQLConnectionString(dbHost, dbUser, dbPasswd, dbName, dbSslMode, dbSslCert, dbSslKey, dbSslRootCert string) (connStr string) {
dbParam := "?"
if strings.Contains(dbName, dbParam) {