summaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/libpq-int.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-03-11 03:08:37 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-03-11 03:08:37 +0000
commita71daab4b465c4701489dd992005c65ca8604584 (patch)
tree02ac5d760dacf002cc2db8134f37a7b4e4870c26 /src/interfaces/libpq/libpq-int.h
parent773e84f52a57e3d1d2d4c98c6f49925b7c47b4ac (diff)
Change PQconndefaults() to return a malloc'd array, instead of a static
array. This allows processing of conninfo strings to be made thread-safe, at the cost of a small memory leak in applications that use PQconndefaults() and are not updated to free the returned array via the new PQconninfoFree() function. But PQconndefaults() is probably not used very much, so this seems like a good compromise.
Diffstat (limited to 'src/interfaces/libpq/libpq-int.h')
-rw-r--r--src/interfaces/libpq/libpq-int.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/interfaces/libpq/libpq-int.h b/src/interfaces/libpq/libpq-int.h
index 16555d98852..92bd9cfba83 100644
--- a/src/interfaces/libpq/libpq-int.h
+++ b/src/interfaces/libpq/libpq-int.h
@@ -12,7 +12,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: libpq-int.h,v 1.19 2000/02/07 23:10:11 petere Exp $
+ * $Id: libpq-int.h,v 1.20 2000/03/11 03:08:37 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -121,7 +121,21 @@ struct pg_result
* last query */
int binary; /* binary tuple values if binary == 1,
* otherwise ASCII */
- PGconn *conn; /* connection we did the query on, if any */
+ /*
+ * The conn link in PGresult is no longer used by any libpq code.
+ * It should be removed entirely, because it could be a dangling link
+ * (the application could keep the PGresult around longer than it keeps
+ * the PGconn!) But there may be apps out there that depend on it,
+ * so we will leave it here at least for a release or so.
+ */
+ PGconn *xconn; /* connection we did the query on, if any */
+
+ /* Callback procedure for notice/error message processing
+ * (copied from originating PGconn).
+ */
+ PQnoticeProcessor noticeHook;
+ void *noticeArg;
+
char *errMsg; /* error message, or NULL if no error */
/* All NULL attributes in the query result point to this null string */