Re: Confusion over Python drivers - Mailing list pgsql-hackers
From | Greg Smith |
---|---|
Subject | Re: Confusion over Python drivers |
Date | |
Msg-id | 4B6DEF6D.1030908@2ndquadrant.com Whole thread Raw |
In response to | Re: Confusion over Python drivers (Marko Kreen <markokr@gmail.com>) |
Responses |
Re: Confusion over Python drivers
Re: Confusion over Python drivers Re: Confusion over Python drivers Re: Confusion over Python drivers |
List | pgsql-hackers |
Marko Kreen wrote: > The pg8000 / bpgsql seem to be toy projects, and anyway you dont > want to use pure-Python drivers in high-performance environments. > We are not talking about C#/java here. > Right, and the comments from James reinforce this general idea: there is little value to the people who most want Python+PostgreSQL support in working on any of the pure Python implementations, because best case performance is still half or less of the ones that more directly wrap libpq. Even the best case with psycopg is enough of a performance hit as it is. > py-postgresql seems to be more serious, but as it's python3 only > which makes it irrelevant today. > Also true. > Psycopg was the leader, especially in web-environments, > but it has non-obvious license and with dead website it does not > seem that attractive. Although it is well-maintained still. > Best path forward would be to talk with Psycopg guys about > license clarification/change. > Agreed. A relicensed Psycopg, with a more professional looking introduction/documentation page (like the budding page on our Wiki) than what the initd web site has, seems like the best platform to hack on top of to me as well. The fact that they've moved to git recently makes it that much easier for another branch to exist even outside of their somewhat troubled infrastructure. To summarize what I saw on this thread, the primary wishlist of changes to it are: -License change -Consider refactoring to better follow standard driver practices, such as using PQExecParams -Improvement in transaction control to resolve issues that cause idle transactions -Possible simplifications in how it's implemented async operations, to improve robustness/reduce code complexity -Confirm/add multi-threaded support -Confirm/add support for the most common standard types (such as array) > PyGreSQL is the oldest, older than DB-API, and so it's DB-API > interface seems an afterthought and is untested/underused - eg. > it does not support bytea. > And if Psycopg can't be relicensed happily and/or improved as above, as the only other native Python driver PyGreSQL looks like the next candidate to build on top of. Its major issues are: -Test/complete/refactor for full DB-API 2.0 support -Add bytea support -Add extension support, perhaps modeled on what Psycopg. -Build a COPY extension -Confirm/add multi-threaded support -Confirm/add support for the most common standard types (such as array) Any other suggestions before I turn the above into a roadmap page on the wiki? -- Greg Smith 2ndQuadrant US Baltimore, MD PostgreSQL Training, Services and Support greg@2ndQuadrant.com www.2ndQuadrant.us
pgsql-hackers by date: