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 09:45:07AM -0800, Webb Sprague wrote:

> > select pg_cancel_backend();
> 
> This seems like it should work from inside a psql session but it doesn't:
> 
> webbs-# ;
>  pg_backend_pid
> ----------------
>           14424
> (1 row)
> 
> webbs=# select pg_cancel_backend(14424);
> ERROR:  canceling statement due to user request
> webbs=#

I think only the superuser can use it.

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.