pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: adey <adey11@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Where do I execute the DISCONNECT command?
Date: Tue, 27 Jun 2006 18:04:47 -0600
Message-ID: <20060628000447.GA54259@winnie.fuhr.org> (raw)
In-Reply-To: <1c66bda80606271622j620d648ao6ee9655d05dc799e@mail.gmail.com>
References: <1c66bda80606271622j620d648ao6ee9655d05dc799e@mail.gmail.com>

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



view thread (2+ messages)

Message-ID: <20060628000447.GA54259@winnie.fuhr.org>
Permalink:  ../20060628000447.GA54259@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20060628000447.GA54259@winnie.fuhr.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: mike@fuhr.org, adey11@gmail.com
  Subject: Re: Where do I execute the DISCONNECT command?
  In-Reply-To: <20060628000447.GA54259@winnie.fuhr.org>
  References: <1c66bda80606271622j620d648ao6ee9655d05dc799e@mail.gmail.com> <20060628000447.GA54259@winnie.fuhr.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox