Re: closing a connection from "outside" an application (for testing)
"Webb Sprague" <[email protected]>
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Message-ID | <[email protected]> |
> 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_backend_pid(); (Thanks to the postgresql list)