Skip to content

Commit 8d1fe38

Browse files
authored
Suggest using optionsToDefaultConfig to generate Config from Options (#268)
rather than changing the connectionOptions field of Config. Partially addresses #267 Co-authored-by: Tom Ellis <[email protected]>
1 parent 9538291 commit 8d1fe38

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/Database/Postgres/Temp/Internal.hs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,8 +432,14 @@ withRestart db f = bracket (restart db) (either mempty stop) $
432432
either (pure . Left) (fmap Right . f)
433433

434434
-- | Attempt to create a 'Config' from a 'Client.Options'. Useful if you
435-
-- want to create a database owned by a specific user you will also login
436-
-- with among other use cases.
435+
-- want to create a database
436+
--
437+
-- * owned by a specific user you will also login with
438+
-- * with a specific name (i.e. not the default name, "postgres")
439+
--
440+
-- among other use cases. Changing the 'connectionOptions' field of
441+
-- 'Config' does /not/ achieve these results and you are likely to see
442+
-- unexpected behaviour if you try to.
437443
--
438444
-- @since 1.21.0.0
439445
optionsToDefaultConfig :: Client.Options -> Config

0 commit comments

Comments
 (0)