# Postgresql Service
## During db-relation-joined,
### the postgresql service provides:
- `host`
- `user`
- `database`
- `password`
### and requires
- `ip`: deprecated way to specify the client ip address to enable
access from. This is no longer necessary, you can rely on the
implicit 'private-address' relation component.
Here's an example client hook providing that
#!/bin/sh
relation-set ip=`unit-get private-address`
## During db-relation-changed,
### provides
### accepts
- `ip`: the client ip address to enable access
| 2012/05/24 kapil.thangavelu@canonical.com inc rev (revno 25) |
| 2012/05/24 kapil.thangavelu@canonical.com fix missing } (revno 24) |
| 2012/05/24 kapil.thangavelu@canonical.com fix copy and paste errors (revno 23) |
| 2012/05/24 kapil.thangavelu@canonical.com fix access grants to joined so its actually usable (revno 22) |
| 2012/05/03 Thomas Hervé Fix pg_hba changes for postgres 9 (revno 21) |
| 2012/01/19 Diogo Matsubara remove /0 notation from db-relation-changed hook to avoid postgresql error (revno 20) |
| 2011/11/22 Mark Mims swap _all_ instances of - in names (revno 19) |
| 2011/11/21 kapil.thangavelu@canonical.com escape dashes in db names (revno 18) |
| 2011/11/18 Mark Mims use unit-get private-address instead of hostname (revno 17) |