Skip to content

Commit 9c2079d

Browse files
authored
Merge pull request vapor#34 from vapor/default-port
Default Postgres port to 5432 when not supplied
2 parents e4d26fd + 4f5c24b commit 9c2079d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/PostgreSQL/Database/PostgreSQLDatabaseConfig.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public struct PostgreSQLDatabaseConfig {
2323
public let password: String?
2424

2525
/// Creates a new `PostgreSQLDatabaseConfig`.
26-
public init(hostname: String, port: Int, username: String, database: String? = nil, password: String? = nil) {
26+
public init(hostname: String, port: Int = 5432, username: String, database: String? = nil, password: String? = nil) {
2727
self.hostname = hostname
2828
self.port = port
2929
self.username = username

0 commit comments

Comments
 (0)