fix: usage with postgres over unix socket #1308
|
@ -148,6 +148,7 @@ func parsePostgreSQLHostPort(info string) (string, string) {
|
||||||
return host, port
|
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) {
|
func getPostgreSQLConnectionString(dbHost, dbUser, dbPasswd, dbName, dbSslMode, dbSslCert, dbSslKey, dbSslRootCert string) (connStr string) {
|
||||||
dbParam := "?"
|
dbParam := "?"
|
||||||
if strings.Contains(dbName, dbParam) {
|
if strings.Contains(dbName, dbParam) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user