The postgresql-config package

[Tags:bsd3, library]

[Skip to Readme]

Properties

Versions 0.0.1, 0.0.2, 0.1.0
Change log CHANGELOG.md
Dependencies aeson, base (>=4.6 && <=5.0), bytestring, monad-control, mtl, postgresql-simple, resource-pool, time [details]
License BSD3
Author Aleksey Uimanov
Maintainer s9gf4ult@gmail.com
Category Database
Home page https://bitbucket.org/s9gf4ult/postgresql-config
Source repository head: git clone git@bitbucket.org:s9gf4ult/postgresql-config.git
Uploaded Fri Jul 31 17:26:29 UTC 2015 by AlekseyUymanov
Distributions NixOS:0.1.0
Downloads 410 total (11 in the last 30 days)
Votes
1 []
Status Docs available [build log]
Last success reported on 2015-09-30 [all 2 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Readme for postgresql-config

Readme for postgresql-config-0.1.0

What?

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

How?

Add separate file or section inside your existing config like that

database:    "dbname"
host:        "127.0.0.1"       # 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.