summaryrefslogtreecommitdiff
path: root/ext/pdo_pgsql/php_pdo_pgsql_int.h
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2004-05-20 17:43:56 +0000
committerIlia Alshanetsky <iliaa@php.net>2004-05-20 17:43:56 +0000
commit38eb52b8a7db2a88c4baaeeaf68ef09f64a7cd49 (patch)
treef6ff98d920ad142bdb6a49e4743b98e14bfa6f28 /ext/pdo_pgsql/php_pdo_pgsql_int.h
parent892ec5f535c89b845bb242446a6f81e4bf46a056 (diff)
downloadphp-git-38eb52b8a7db2a88c4baaeeaf68ef09f64a7cd49.tar.gz
Make doer() work.
Make error reporting system work.
Diffstat (limited to 'ext/pdo_pgsql/php_pdo_pgsql_int.h')
-rw-r--r--ext/pdo_pgsql/php_pdo_pgsql_int.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/ext/pdo_pgsql/php_pdo_pgsql_int.h b/ext/pdo_pgsql/php_pdo_pgsql_int.h
index 91a4d3451c..7d0be93586 100644
--- a/ext/pdo_pgsql/php_pdo_pgsql_int.h
+++ b/ext/pdo_pgsql/php_pdo_pgsql_int.h
@@ -25,12 +25,19 @@
#include <libpq-fe.h>
+typedef struct {
+ const char *file;
+ int line;
+ unsigned int errcode;
+ char *errmsg;
+} pdo_pgsql_error_info;
+
/* stuff we use in a pgsql database handle */
typedef struct {
PGconn *server;
- char *last_err;
unsigned attached:1;
unsigned _reserved:31;
+ pdo_pgsql_error_info einfo;
} pdo_pgsql_db_handle;
typedef struct {
@@ -41,7 +48,6 @@ typedef struct {
pdo_pgsql_db_handle *H;
PGresult *result;
int current_row;
- char *last_err;
pdo_pgsql_column *cols;
} pdo_pgsql_stmt;
@@ -54,9 +60,9 @@ typedef struct {
extern pdo_driver_t pdo_pgsql_driver;
-extern int _pdo_pgsql_error(char *what, char *errmsg, const char *file, int line TSRMLS_DC);
-#define pdo_pgsql_error(w,s) _pdo_pgsql_error(w, s, __FILE__, __LINE__ TSRMLS_CC)
-extern int pgsql_handle_error(pdo_dbh_t *dbh, pdo_pgsql_db_handle *H, int errcode);
+extern int _pdo_pgsql_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, int errcode, const char *file, int line TSRMLS_DC);
+#define pdo_pgsql_error(d,e) _pdo_pgsql_error(d, NULL, e, __FILE__, __LINE__ TSRMLS_CC)
+#define pdo_pgsql_error_stmt(s,e) _pdo_pgsql_error(s->dbh, s, e, __FILE__, __LINE__ TSRMLS_CC)
extern struct pdo_stmt_methods pgsql_stmt_methods;