Mercurial > libervia-pubsub
diff idavoll/pgsql_storage.py @ 170:958e69630e52
Provide twistd parameters for connecting to a remote PostgreSQL database.
Author: edwinm (ralphm)
Reviewer: ralphm
Fixes #6.
author | Ralph Meijer <ralphm@ik.nu> |
---|---|
date | Tue, 09 Oct 2007 10:20:25 +0000 |
parents | ef22e4150caa |
children | bc269696ef42 |
line wrap: on
line diff
--- a/idavoll/pgsql_storage.py Thu Oct 04 08:03:51 2007 +0000 +++ b/idavoll/pgsql_storage.py Tue Oct 09 10:20:25 2007 +0000 @@ -12,11 +12,14 @@ implements(iidavoll.IStorage) - def __init__(self, user, database, password = None): + def __init__(self, user, database, password=None, host=None, port=None): self._dbpool = adbapi.ConnectionPool('pyPgSQL.PgSQL', user=user, password=password, database=database, + host=host, + port=port, + cp_reconnect=True, client_encoding='utf-8' )