aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/ecpglib/connect.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/ecpg/ecpglib/connect.c')
-rw-r--r--src/interfaces/ecpg/ecpglib/connect.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/interfaces/ecpg/ecpglib/connect.c b/src/interfaces/ecpg/ecpglib/connect.c
index e1f0957d435..7f1003ec7ad 100644
--- a/src/interfaces/ecpg/ecpglib/connect.c
+++ b/src/interfaces/ecpg/ecpglib/connect.c
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.48 2007/11/15 21:14:45 momjian Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.49 2008/03/20 16:29:44 meskes Exp $ */
#define POSTGRES_ECPG_INTERNAL
#include "postgres_fe.h"
@@ -565,3 +565,13 @@ ECPGdisconnect(int lineno, const char *connection_name)
return true;
}
+
+PGconn* ECPGget_PGconn(const char *connection_name)
+{
+ struct connection * con;
+
+ con=ecpg_get_connection(connection_name);
+ if (con==NULL) return NULL;
+
+ return con->connection;
+}