Re: closing a connection from "outside" an application (for testing)
Karsten Hilbert <[email protected]>
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Message-ID | <[email protected]> |
On Sat, Jan 05, 2008 at 02:18:27PM +0100, Manlio Perillo wrote: > Federico Di Gregorio ha scritto: > > Il giorno gio, 03/01/2008 alle 21.26 -0800, Webb Sprague ha scritto: > >> Is there a way for psycopg to return the PID of the process it is > >> connected to, primarily for logging (and killing)? I am still trying > >> to figure out how to stop a run of my program in mid-stream (besides a > >> sleep() or waiting on a signal...), but that will get me started. > > > > No way, right now (unless you can do that using a query; I don't know.) select pg_cancel_backend(); Karsten -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346