Jan Urbański
2010-07-24 21:06:43 UTC
Hi,
here's a patch to support query cancellation via
http://www.postgresql.org/docs/8.4/static/libpq-cancel.html
It's based on top of my rollback_on_exit branch in
http://git.wulczer.org/?p=psycopg2.git, simply because I think the first
branch should be merged in first, but they're mostly independent.
You can cancel both synchronous and asynchronous queries, I haven't
tried green queries, but I think they should work too. I'll add support
for this in the Twisted wrapper soon, hopefully using Deferred cancellation.
Cheers,
Jan
here's a patch to support query cancellation via
http://www.postgresql.org/docs/8.4/static/libpq-cancel.html
It's based on top of my rollback_on_exit branch in
http://git.wulczer.org/?p=psycopg2.git, simply because I think the first
branch should be merged in first, but they're mostly independent.
You can cancel both synchronous and asynchronous queries, I haven't
tried green queries, but I think they should work too. I'll add support
for this in the Twisted wrapper soon, hopefully using Deferred cancellation.
Cheers,
Jan