We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4f4b93f commit c32d365Copy full SHA for c32d365
1 file changed
src/Codd/Types.hs
@@ -64,12 +64,15 @@ libpqConnString ConnectionString {..} =
64
where
65
mixedKwvps =
66
catMaybes
67
- [ Just ("user", quote user),
+ [ if user == "" then Nothing else Just ("user", quote user),
68
Just
69
("host", quote hostname),
70
- Just
71
- ("dbname", quote database),
72
- Just ("password", quote password),
+ if database == ""
+ then Nothing
+ else
73
+ Just
74
+ ("dbname", quote database),
75
+ if password == "" then Nothing else Just ("password", quote password),
76
Just ("port", quote (show port)),
77
options >>= (Just . ("options",)) . quote
78
]
0 commit comments