aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/ecpg/include')
-rw-r--r--src/interfaces/ecpg/include/Makefile2
-rw-r--r--src/interfaces/ecpg/include/ecpgerrno.h22
-rw-r--r--src/interfaces/ecpg/include/ecpglib.h6
-rw-r--r--src/interfaces/ecpg/include/sqlca.h5
4 files changed, 31 insertions, 4 deletions
diff --git a/src/interfaces/ecpg/include/Makefile b/src/interfaces/ecpg/include/Makefile
index caa13a8d916..836fba3ed77 100644
--- a/src/interfaces/ecpg/include/Makefile
+++ b/src/interfaces/ecpg/include/Makefile
@@ -6,11 +6,13 @@ all clean::
@echo Nothing to be done.
install::
+ $(INSTALL) $(INSTLOPTS) ecpgerrno.h $(DESTDIR)$(HEADERDIR)
$(INSTALL) $(INSTLOPTS) ecpglib.h $(DESTDIR)$(HEADERDIR)
$(INSTALL) $(INSTLOPTS) ecpgtype.h $(DESTDIR)$(HEADERDIR)
$(INSTALL) $(INSTLOPTS) sqlca.h $(DESTDIR)$(HEADERDIR)
uninstall::
+ rm -f $(DESTDIR)$(HEADERDIR)/ecpgerrno.h
rm -f $(DESTDIR)$(HEADERDIR)/ecpglib.h
rm -f $(DESTDIR)$(HEADERDIR)/ecpgtype.h
rm -f $(DESTDIR)$(HEADERDIR)/sqlca.h
diff --git a/src/interfaces/ecpg/include/ecpgerrno.h b/src/interfaces/ecpg/include/ecpgerrno.h
new file mode 100644
index 00000000000..1be718216d7
--- /dev/null
+++ b/src/interfaces/ecpg/include/ecpgerrno.h
@@ -0,0 +1,22 @@
+#ifndef _ECPG_ERROR_H
+#define _ECPG_ERROR_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
+
+#endif /* !_ECPG_ERROR_H */
diff --git a/src/interfaces/ecpg/include/ecpglib.h b/src/interfaces/ecpg/include/ecpglib.h
index b828763fa36..9a5c2732d8f 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 *dbname);
+bool ECPGconnect(const char *);
bool ECPGdo(int, char *,...);
bool ECPGtrans(int, const char *);
bool ECPGfinish(void);
-bool ECPGstatus(void);
+bool ECPGdisconnect(const char *);
void ECPGlog(const char *format,...);
@@ -39,3 +39,5 @@ void sqlprint(void);
#ifdef __cplusplus
}
#endif
+
+#include <ecpgerrno.h>
diff --git a/src/interfaces/ecpg/include/sqlca.h b/src/interfaces/ecpg/include/sqlca.h
index e493e46bb5d..7e99484d5ae 100644
--- a/src/interfaces/ecpg/include/sqlca.h
+++ b/src/interfaces/ecpg/include/sqlca.h
@@ -10,10 +10,11 @@ struct sqlca
int sqlcode;
struct
{
- int sqlerrml;
+ int sqlerrml;
char sqlerrmc[1000];
} sqlerrm;
-} sqlca;
+ long sqlerrd[6];
+} sqlca;
#endif