X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id AA1F39FA5E7 for ; Tue, 27 Jun 2006 21:05:06 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 23660-07 for ; Tue, 27 Jun 2006 21:04:58 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by postgresql.org (Postfix) with ESMTP id 5178F9F9DCC for ; Tue, 27 Jun 2006 21:04:57 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.7/8.13.7) with ESMTP id k5S04mtu076509 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 27 Jun 2006 18:04:51 -0600 (MDT) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.6/8.13.6) with ESMTP id k5S04mpN054321; Tue, 27 Jun 2006 18:04:48 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.6/8.13.6/Submit) id k5S04lVt054320; Tue, 27 Jun 2006 18:04:47 -0600 (MDT) (envelope-from mfuhr) Date: Tue, 27 Jun 2006 18:04:47 -0600 From: Michael Fuhr To: adey Cc: pgsql-admin@postgresql.org Subject: Re: Where do I execute the DISCONNECT command? Message-ID: <20060628000447.GA54259@winnie.fuhr.org> References: <1c66bda80606271622j620d648ao6ee9655d05dc799e@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1c66bda80606271622j620d648ao6ee9655d05dc799e@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/264 X-Sequence-Number: 22226 On Wed, Jun 28, 2006 at 11:22:18AM +1200, adey wrote: > Please could you tell me where I must execute the following to disconnect > idle transactions in Potgres:- > > EXEC SQL DISCONNECT [connection-name]; This is ECPG syntax; you'd use it in client programs that embed SQL commands alongside C code. http://www.postgresql.org/docs/8.1/interactive/ecpg.html http://www.postgresql.org/docs/8.1/interactive/ecpg-disconnect.html > I've tried variations of this syntax in PGAdmin, psql, and the Linus command > line in both v8.1.4 and v7.4.2 - all of which fail. > COuld you also tell me what "connection-name" is? I've assumed it's the PID > as listed in pg_stat_activity, but haven't been able to test this as I can't > get the syntax and environment correct. See "Connecting to the Database Server" in the ECPG documentation. http://www.postgresql.org/docs/8.1/interactive/ecpg-connect.html I'm guessing you're looking for something else. Could you explain a bit more about what you're trying to do? -- Michael Fuhr