Johannes Bauer schrieb:
> self.db_conn = pgdb.connect("%s:%s:%s:%s:sslmode=%s" %
> (config['prism_db_hostname'][0], config['prism_db_database'][0],
> config['prism_db_username'][0], config['prism_db_password'][0],
> config['prism_db_sslmode'][0]))
Are you sure you're not getting an error here already? I'm getting:
pg.InternalError: FATAL: ungültige Kommandozeilenargumente für
Serverprozess
TIP: Versuchen Sie »postgres --help« für weitere Informationen.
I think this is because the options here refer to server process
options, and sslmode is not one of them.
The problem is that PyGreSQL uses the PQsetdbLogin function instead of
the newer PQconnectdb which provides more options inculding sslmode. But
there is a workaround for passing the newer options:
db = pgdb.connect(database=
"host=... dbname=... user=... password=... sslmode=require")
Another workaround would be setting the PGSSLMODE environment variable.
But I think we should switch to using PQconnectdb in PyGreSQL.
-- Christoph
_______________________________________________
PyGreSQL mailing list
[email protected]
http://mailman.vex.net/mailman/listinfo/pygresql