Unix Technical Forum

Request for feature - ECPGget_PGconn

This is a discussion on Request for feature - ECPGget_PGconn within the pgsql Hackers forums, part of the PostgreSQL category; --> Request Overview ---------------- Add a function to return the current PGConn used within ecpg.. Background ---------- For years now ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-15-2008, 11:47 PM
Mike Aubury
 
Posts: n/a
Default Request for feature - ECPGget_PGconn


Request Overview
----------------
Add a function to return the current PGConn used within ecpg..


Background
----------
For years now within the Aubit4GL project we've been able to access the PGConn
record used by ecpg by the highly dubious means of accessing an internal
record within ecpg (which has now been removed/hidden).
It would be really useful if we could get at the PGConn connection via a
formal API/function call...

This would be useful to others as it would allow libpq calls on the currently
open connection to use features for which there is no direct ecpg equivilent,
or where the functionality has already been implemented using libpq calls.
(The ability to drop to a lower level of abstraction is common in most db
orientated languages/language extensions like esql/c.)



Implementation
--------------

This could be implemented by adding the following code to the existing
ecpglib/connect.c file :

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

return con->connection;
}




TIA


--
Mike Aubury

Aubit Computing Ltd is registered in England and Wales, Number: 3112827
Registered Address : Clayton House,59 Piccadilly,Manchester,M1 2AQ



--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:13 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com