your opinion about psycopg vs pygresql

Maxim Sloyko m.sloyko at gmail.com
Thu Dec 21 03:26:42 EST 2006


Martin P. Hellwig wrote:

> However, given the choice, what in your opinion would be the reason why
> someone would chose one over the other? Now I know this could easily get
> into a flamewar, so if you comment (but please do so) I'll still
> investigate that, since at this moment I don't even have a clue how they
> differ and on what reason, why does PostgreSQL seem to favour pygresql
> and Pythoneers psycopg?
>
> Thanks in advance.

Well, my info can be a little out of date, since I researched this
problem more than a year ago.
AFAIK, psycopg still lacks prepared statements, which can be a huge
drawback (partial workaround: use executemany() whenever possible).
Psycopg 2 (as opposed to psycopg 1.1) does not support commit() on
cursor (no serialized connections)

Among the advantages of psycopg 2 is its very good support of mappings
between Python data types and PostgreSQL data types. You can easily
introduce your own mappings, even for composite data types. 

My $0.02




More information about the Python-list mailing list