psycopg2 and large queries

Laszlo Nagy gandalf at shopzeus.com
Thu Dec 18 16:28:23 EST 2008


> Well, there are plenty of PostgreSQL modules around these days, and
> even if pyPgSQL isn't suitable, I'm sure that there must be one which
> can be made to work on Windows and to support server-side cursors. See
> here for more:
>
> http://wiki.python.org/moin/PostgreSQL
>   
I'm just looking for something that can replace psycopg2, because of the 
bug mentioned in my original post. Here are my options:

- psycopg1: development stalled
- psycopg2: memory bug and/or not db api compilant (see my original post)
- pyPgSQL: looks like that the last release was in mid 2006 (and it 
depends on mxDateTime -> licensing problems)
- mxODBC: commercial
- PyGresSQL: apparently, it does not support fetching one row, only 
fetching all rows (see: 
http://www.pygresql.org/pg.html#getresult-get-query-values-as-list-of-tuples), 
so this is not an option. (Yes, it also has a db api compilant module, 
but it is only a wrapper around pgqueryobject, and it does not support 
server side cursors...)

So there are many options, but do we have one that:

1. supports server side cursors (fetch some rows after opening the 
query, but not all of them)
2. open source, with no licensing problems
3. actively maintained

Thanks,

Laszlo




More information about the Python-list mailing list