Skip to content

Commit

Permalink
Use Postgres default port for URLs (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
vknabel authored Apr 23, 2020
1 parent 8f6d4fa commit b465e9e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Sources/PostgresKit/PostgresConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ public struct PostgresConfiguration {
guard let hostname = url.host else {
return nil
}
guard let port = url.port else {
return nil
}
let port = url.port ?? 5432

let tlsConfiguration: TLSConfiguration?
if url.query?.contains("ssl=true") == true || url.query?.contains("sslmode=require") == true {
Expand Down

0 comments on commit b465e9e

Please sign in to comment.