postgresql-config: Types for easy adding postgresql configuration to your program

[ bsd3, database, library ] [ Propose Tags ]




Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS] 0.0.1, 0.0.2, 0.1.0
Change log
Dependencies aeson, base (>=4.6 && <=5.0), bytestring, monad-control, mtl, postgresql-simple, resource-pool, time [details]
License BSD-3-Clause
Author Aleksey Uimanov
Category Database
Home page
Source repo head: git clone
Uploaded by AlekseyUymanov at 2015-07-31T17:26:29Z
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 2411 total (17 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2015-09-30 [all 2 reports]

Readme for postgresql-config-0.1.0

[back to package description]


Simple types and set of functions to quickly add configuration of postgresql to your Yesod site or whatever.


Add separate file or section inside your existing config like that

database:    "dbname"
host:        ""       # optional
port:         5432             # optional
user:        "dbuser"
password:    "pass"
poolsize:    10               # optional maximum connections in pool
pooltimeout: 60               # optional minimum connection lifetime
poolstripes: 1                # optional count of stripes in pool

and then in your program something like that

conf <- decodeFile "pgconfig.yml"
         >>= maybe (fail "Could not parse pgconfig.yml") return
pool <- createPGPool conf
pingPGPool pool

So now you have a pool and can perform queries any way you like.