[mike.aubury@aubit.com: PGconn ?] - Mailing list pgsql-hackers

From Michael Meskes
Subject [mike.aubury@aubit.com: PGconn ?]
Date
Msg-id 20080201080310.GB10698@feivel.credativ.de
Whole thread Raw
Responses Re: [mike.aubury@aubit.com: PGconn ?]  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
----- Forwarded message from Mike Aubury <mike.aubury@aubit.com> -----

From: Mike Aubury <mike.aubury@aubit.com>
To: Michael Meskes <meskes@postgresql.org>
Subject: PGconn ?
Date: Wed, 30 Jan 2008 19:51:00 +0000


Any chance of adding this (or something similar) for the next RC?


ecpglib/connect.c : 

PGconn* ECPGget_PGconn(const char *connection_name) {           struct connection * con;
con=ecpg_get_connection(connection_name);          if (con==NULL) return NULL;    
 
           return con->connection;}


and then in include/ecpglib.h#define HAS_ECPGget_PGconnPGconn *ECPGget_PGconn(const char *connection_name);


-- 
Mike Aubury

Aubit Computing Ltd is registered in England and Wales, Number: 3112827
Registered Address : Murlain Business Centre, Union Street, Chester, CH1 1QP

----- End forwarded message -----

I don't like the idea of adding a feature albeit a very small one to 8.3
at this point in time without even a small discussion. Mike explained to
me that he needs to access the PGconn structure of the current
connection. He used to get it by using an undocumented but exported
internal function in libecpg. However, with us cleaning up the namespace
this function now disappeared and I refused to reactivate it because it
only gave a pointer to an undocumented internal structure. However, the
approach he's proposing now (using the PGconn structure instead) works
inside the documented PGSQL framework and thus whould be fine. Is it
okay to add this to 8.3. now? Yes, I know, I need to add it to the
export list too.

In the long run I would like to implement whatever is missing in ecpg
and deprecate this function, but this isn't doable for 8.3.

Michael
-- 
Michael Meskes
Email: Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL!


pgsql-hackers by date:

Previous
From: Devrim GÜNDÜZ
Date:
Subject: [Fwd: [COMMITTERS] pgsql: Stamp 8.3 in CVS.]
Next
From: Tom Lane
Date:
Subject: Re: [mike.aubury@aubit.com: PGconn ?]