aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/include
diff options
context:
space:
mode:
authorMarc G. Fournier <scrappy@hub.org>1998-05-18 16:05:05 +0000
committerMarc G. Fournier <scrappy@hub.org>1998-05-18 16:05:05 +0000
commitef567413d2f7a75c31b79a48c79ff628fec3e5fa (patch)
treea171796f653770dce0c6337ff71aa3fae7b5fcce /src/interfaces/ecpg/include
parentd1c5021c67fc91ea0b686305893cdf186ea27cd6 (diff)
downloadpostgresql-ef567413d2f7a75c31b79a48c79ff628fec3e5fa.tar.gz
postgresql-ef567413d2f7a75c31b79a48c79ff628fec3e5fa.zip
From: Michael Meskes <meskes@topsystem.de>
+ + Wed May 6 16:09:45 CEST 1998 + + - Some more cleanups in the library. + + Thu May 7 12:34:28 CEST 1998 + + - Made CONNECT and DISCONNECT statement more SQL3 compliant. + - Changed the API for the ECPGconnect function to be able to handle + hostnames and ports + + Fri May 8 13:54:45 CEST 1998 + - More changes to the parser. The connect statement now allows + ORACLE style logins. + - db-name is accepted in two ways: + - <dbname>[@<server>][:<port>] + - esql:postgresql://<server>[:<port>][/<dbname>] + + Mon May 11 10:28:37 CEST 1998 + + - Added '? options' to connect call. + - Also allow USING as keyword for the password + + Thu May 14 15:09:58 CEST 1998 + + - Changed preproc.y and pgc.l according to the parser changes in the + backend. + + Fri May 15 09:55:21 CEST 1998 + + - Added connection_name handling + + + Mon May 18 10:33:58 CEST 1998 + + - Fixed some more bugs + - Set version to 2.3.1 + - Set library version to 2.2
Diffstat (limited to 'src/interfaces/ecpg/include')
-rw-r--r--src/interfaces/ecpg/include/ecpgerrno.h36
-rw-r--r--src/interfaces/ecpg/include/ecpglib.h6
2 files changed, 26 insertions, 16 deletions
diff --git a/src/interfaces/ecpg/include/ecpgerrno.h b/src/interfaces/ecpg/include/ecpgerrno.h
index 1be718216d7..cddc7e6a686 100644
--- a/src/interfaces/ecpg/include/ecpgerrno.h
+++ b/src/interfaces/ecpg/include/ecpgerrno.h
@@ -1,22 +1,32 @@
#ifndef _ECPG_ERROR_H
#define _ECPG_ERROR_H
+#include <errno.h>
+
/* This is a list of all error codes the embedded SQL program can return */
#define ECPG_NO_ERROR 0
#define ECPG_NOT_FOUND 100
-#define ECPG_PGSQL -1
-#define ECPG_UNSUPPORTED -2
-#define ECPG_TOO_MANY_ARGUMENTS -3
-#define ECPG_TOO_FEW_ARGUMENTS -4
-#define ECPG_TRANS -5
-#define ECPG_TOO_MANY_MATCHES -6
-#define ECPG_INT_FORMAT -7
-#define ECPG_UINT_FORMAT -8
-#define ECPG_FLOAT_FORMAT -9
-#define ECPG_CONVERT_BOOL -10
-#define ECPG_EMPTY -11
-#define ECPG_CONNECT -12
-#define ECPG_DISCONNECT -13
+/* system error codes returned by ecpglib get the correct number,
+ * but are made negative
+ */
+#define ECPG_OUT_OF_MEMORY -ENOMEM
+
+/* first we have a set of ecpg messages, they start at 200 */
+#define ECPG_UNSUPPORTED -200
+#define ECPG_TOO_MANY_ARGUMENTS -201
+#define ECPG_TOO_FEW_ARGUMENTS -202
+#define ECPG_TOO_MANY_MATCHES -203
+#define ECPG_INT_FORMAT -204
+#define ECPG_UINT_FORMAT -205
+#define ECPG_FLOAT_FORMAT -206
+#define ECPG_CONVERT_BOOL -207
+#define ECPG_EMPTY -208
+#define ECPG_NO_CONN -209
+
+/* finally the backend error messages, they start at 300 */
+#define ECPG_PGSQL -300
+#define ECPG_TRANS -301
+#define ECPG_CONNECT -302
#endif /* !_ECPG_ERROR_H */
diff --git a/src/interfaces/ecpg/include/ecpglib.h b/src/interfaces/ecpg/include/ecpglib.h
index 9a5c2732d8f..c0603b2e7f5 100644
--- a/src/interfaces/ecpg/include/ecpglib.h
+++ b/src/interfaces/ecpg/include/ecpglib.h
@@ -5,11 +5,11 @@ extern "C" {
#endif
void ECPGdebug(int, FILE *);
-bool ECPGconnect(const char *);
+bool ECPGsetconn(int, const char *);
+bool ECPGconnect(int, const char *, const char *, const char *, const char *);
bool ECPGdo(int, char *,...);
bool ECPGtrans(int, const char *);
-bool ECPGfinish(void);
-bool ECPGdisconnect(const char *);
+bool ECPGdisconnect(int, const char *);
void ECPGlog(const char *format,...);