aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/libpq-events.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-09-19 16:40:40 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-09-19 16:40:40 +0000
commite2b7d0c65c611ae3044eb3a49ada71aa22cbca80 (patch)
treeb7c0f914965252a1a729bbed3e1cdd9b54af5c72 /src/interfaces/libpq/libpq-events.c
parent7626f2a9369d38f5015c7506e9df4567ee26abce (diff)
downloadpostgresql-e2b7d0c65c611ae3044eb3a49ada71aa22cbca80.tar.gz
postgresql-e2b7d0c65c611ae3044eb3a49ada71aa22cbca80.zip
Improve the recently-added libpq events code to provide more consistent
guarantees about whether event procedures will receive DESTROY events. They no longer need to defend themselves against getting a DESTROY without a successful prior CREATE. Andrew Chernow
Diffstat (limited to 'src/interfaces/libpq/libpq-events.c')
-rw-r--r--src/interfaces/libpq/libpq-events.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/interfaces/libpq/libpq-events.c b/src/interfaces/libpq/libpq-events.c
index 7d3d1cb26c1..9f46336a58b 100644
--- a/src/interfaces/libpq/libpq-events.c
+++ b/src/interfaces/libpq/libpq-events.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/interfaces/libpq/libpq-events.c,v 1.1 2008/09/17 04:31:08 tgl Exp $
+ * $PostgreSQL: pgsql/src/interfaces/libpq/libpq-events.c,v 1.2 2008/09/19 16:40:40 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -76,6 +76,7 @@ PQregisterEventProc(PGconn *conn, PGEventProc proc,
return FALSE;
conn->events[conn->nEvents].passThrough = passThrough;
conn->events[conn->nEvents].data = NULL;
+ conn->events[conn->nEvents].resultInitialized = FALSE;
conn->nEvents++;
regevt.conn = conn;