Re: Checking for open connections using ECPG

From: Michael Meskes <meskes(at)postgresql(dot)org>
To: hopeye(at)cfl(dot)rr(dot)com
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Checking for open connections using ECPG
Date: 2002-03-07 11:26:39
Message-ID: 20020307112639.GH13615@feivel.credativ.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

On Wed, Mar 06, 2002 at 02:20:05PM -0500, Jim Parker wrote:
> Is there anyway to check for open connections to a database using ECPG ?

Well, you should be able to call ECPGget_connection(). However, it seems
the function is not defined in the include files, so the prototype is:

struct connection * ECPGget_connection(const char *);

But struct connection is an internal datatype that also is not defined
in any header file. So you have to get this from the sources of ecpglib.

To be honest this is a hack. I think I will create a function that does
exactly what you need. Any one out there with an idea how to call this
with an EXEC SQL syntax?

Michael
--
Michael Meskes
Michael(at)Fam-Meskes(dot)De
Go SF 49ers! Go Rhein Fire!
Use Debian GNU/Linux! Use PostgreSQL!

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Fernando de la Fuente Garcia 2002-03-07 12:09:40 Problem trying to connect to a database with PGACCESS
Previous Message impala 2002-03-07 09:38:22 APPLETVIEWER: Can't find database driver