Johannes Bauer schrieb:
> Christoph Zwerschke schrieb:
>> 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.
> 
> No, I'm pretty sure - maybe your version of PostgreSQL is compiled 
> without SSL support? Or you do not have a recent enough version of 
> Postgres (I'm using 8.3)? When using the "sslmode" option in psql for 
> example, it works fine.

No, I'm, using 8.3 with SSL support. The error message would also be 
different in this case.

My question was not whether sslmode=require ever worked for you (with 
psql), but whether the above pgdb command ever worked. I think it should 
always give the error message above, even for sslmode=allow.

 >> But I think we should switch to using PQconnectdb in PyGreSQL.
 >
 > Uhm, can't comment on that - I'm just a Python newbie. Must say I was
 > *really* confused by the dozens of different Postgres/Python APIs.
 > Well I'm slowly getting there ;-)

Welcome to Python land then ;-) Though the question above was actually 
refering to the PostgreSQL C API. Are there really so many PG/Py APIs? 
I'm only aware of 3-4. PyGreSQL is the oldest of them I think. That's 
why it does not use the newer API calls in some places. We need to 
update these in the long run, but carefully, so we stay backward 
compatibility with older PG versions.

-- Christoph
_______________________________________________
PyGreSQL mailing list
[email protected]
http://mailman.vex.net/mailman/listinfo/pygresql

Reply via email to