I only have pgdb installed on my system and I can't use Postgrès with web.db.
I get the following exceptions:
File "/usr/lib64/python2.6/site-packages/web/db.py", line 918, in _connect
AttributeError: 'pgdbCnx' object has no attribute 'set_client_encoding'
Indeed, pgdb module doesn't provide this method or any equivalent.
Here's a patch for the db.py file that works at home, I think it will preserve the behavior for psycopg* users. I did'nt figure out how to know which module in the was used in the _connect contexte, so I exploited the AttributeError exception to call the correct method.
> except (AttributeError):
> conn.cursor().execute("set client_encoding to 'UTF-8'")
There's the same issue with _connect_with_pooling, but I didn't meet her ;)
Have a nice day :)
Fixed error in creating PostgresDB with pgdb driver. Closed by 35674c8 (tx cninucci)
Fixed error in creating PostgresDB with pgdb driver. Closes #23 (tx c…