Added ECPGget_PGconn() function to ecpglib, courtesy of Mike Aubury.
authorMichael Meskes <meskes@postgresql.org>
Thu, 20 Mar 2008 16:29:45 +0000 (16:29 +0000)
committerMichael Meskes <meskes@postgresql.org>
Thu, 20 Mar 2008 16:29:45 +0000 (16:29 +0000)
Removed one include file from connect-test1.

src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ecpglib/Makefile
src/interfaces/ecpg/ecpglib/connect.c
src/interfaces/ecpg/include/ecpglib.h
src/interfaces/ecpg/test/expected/connect-test1.c.in

index 2147d28efcb083e91053c2106ed8507ac6bce371..0d11db51db15962bb8e471e7e66b8870cfe3de95 100644 (file)
@@ -2331,4 +2331,9 @@ Sun, 02 Mar 2008 11:50:48 +0100
 Thu, 20 Mar 2008 16:54:27 +0100
 
        - Changed statement escaping to not escape continuation line markers.
+       - Added ECPGget_PGconn() function to ecpglib, courtesy of Mike Aubury.
+       - Set pgtypes library version to 3.1.
+       - Set compat library version to 3.1.
+       - Set ecpg library version to 6.2.
+       - Set ecpg version to 4.5.
 
index 4e90041d03caede2350f4f697ed1390463dc22ba..165dc0b6791f5d9336042b970142e8cd53cdb36c 100644 (file)
@@ -15,7 +15,7 @@ include $(top_builddir)/src/Makefile.global
 
 NAME= ecpg
 SO_MAJOR_VERSION= 6
-SO_MINOR_VERSION= 1
+SO_MINOR_VERSION= 2
 DLTYPE= library
 
 override CPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include \
index 209dcf1487e6c3560ca3b410bfe55a46397ade05..cf4b001b635430d15fd68c70ac31087ed12534c6 100644 (file)
@@ -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;
+}
index d2706538bc335b2f6bed5c952d8edcb05dd0b0e1..50016efe5915fa7331e933d74b09c7f753b01430 100644 (file)
@@ -47,11 +47,13 @@ bool                ECPGdo(const int, const int, const int, const char *, const bool, const in
 bool           ECPGtrans(int, const char *, const char *);
 bool           ECPGdisconnect(int, const char *);
 bool           ECPGprepare(int, const char *, const int, const char *, const char *);
-bool           ECPGdeallocate(int, int, const char *connection_name, const char *name);
-bool           ECPGdeallocate_all(int, int, const char *connection_name);
-char      *ECPGprepared_statement(const char *connection_name, const char *name, int);
+bool           ECPGdeallocate(int, int, const char *, const char *);
+bool           ECPGdeallocate_all(int, int, const char *);
+char           *ECPGprepared_statement(const char *, const char *, int);
+PGconn         *ECPGget_PGconn(const char *);
 
-char      *ECPGerrmsg(void);
+
+char           *ECPGerrmsg(void);
 
  /* print an error message */
 void           sqlprint(void);
@@ -63,18 +65,17 @@ void                sqlprint(void);
 
 /* dynamic SQL */
 
-bool ECPGdo_descriptor(int line, const char *connection,
-                                 const char *descriptor, const char *query);
-bool           ECPGdeallocate_desc(int line, const char *name);
-bool           ECPGallocate_desc(int line, const char *name);
+bool           ECPGdo_descriptor(int, const char *, const char *, const char *);
+bool           ECPGdeallocate_desc(int, const char *);
+bool           ECPGallocate_desc(int, const char *);
 bool           ECPGget_desc_header(int, const char *, int *);
-bool           ECPGget_desc(int, const char *, int,...);
+bool           ECPGget_desc(int, const char *, int, ...);
 bool           ECPGset_desc_header(int, const char *, int);
-bool           ECPGset_desc(int, const char *, int,...);
+bool           ECPGset_desc(int, const char *, int, ...);
 
 void           ECPGset_noind_null(enum ECPGttype, void *);
 bool           ECPGis_noind_null(enum ECPGttype, void *);
-bool           ECPGdescribe(int, bool, const char *,...);
+bool           ECPGdescribe(int, bool, const char *, ...);
 
 /* dynamic result allocation */
 void           ECPGfree_auto_mem(void);
index a6e862e13f2bd8d73c2a235c74c98bb9e9c8aaa8..f0dac0e68b5cff0f9dce358caa687a35a2abe00e 100644 (file)
@@ -1,6 +1,5 @@
 /* Processed by ecpg (regression mode) */
 /* These include files are added by the preprocessor */
-#include <ecpgtype.h>
 #include <ecpglib.h>
 #include <ecpgerrno.h>
 #include <sqlca.h>