diff options
| author | Tom Lane | 2008-09-19 20:06:13 +0000 |
|---|---|---|
| committer | Tom Lane | 2008-09-19 20:06:13 +0000 |
| commit | 3290e6180fcd4b73ea1badb2d10e9bf44496cd91 (patch) | |
| tree | 4eee8750313139017616681e3402113c73658557 /src/interfaces/libpq/libpq-events.h | |
| parent | 4e57668da475f47242d8552df371a3dbef5205f8 (diff) | |
Add a PQfireResultCreateEvents function to allow applications to mimic the
sequence of operations that libpq goes through while creating a PGresult.
Also, remove ill-considered "const" decoration on parameters passed to
event procedures.
Diffstat (limited to 'src/interfaces/libpq/libpq-events.h')
| -rw-r--r-- | src/interfaces/libpq/libpq-events.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/interfaces/libpq/libpq-events.h b/src/interfaces/libpq/libpq-events.h index 33e2d5b046c..ae708307cf0 100644 --- a/src/interfaces/libpq/libpq-events.h +++ b/src/interfaces/libpq/libpq-events.h @@ -8,7 +8,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/interfaces/libpq/libpq-events.h,v 1.1 2008/09/17 04:31:08 tgl Exp $ + * $PostgreSQL: pgsql/src/interfaces/libpq/libpq-events.h,v 1.2 2008/09/19 20:06:13 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -36,22 +36,22 @@ typedef enum typedef struct { - const PGconn *conn; + PGconn *conn; } PGEventRegister; typedef struct { - const PGconn *conn; + PGconn *conn; } PGEventConnReset; typedef struct { - const PGconn *conn; + PGconn *conn; } PGEventConnDestroy; typedef struct { - const PGconn *conn; + PGconn *conn; PGresult *result; } PGEventResultCreate; @@ -63,7 +63,7 @@ typedef struct typedef struct { - const PGresult *result; + PGresult *result; } PGEventResultDestroy; typedef int (*PGEventProc) (PGEventId evtId, void *evtInfo, void *passThrough); @@ -84,6 +84,9 @@ extern int PQresultSetInstanceData(PGresult *result, PGEventProc proc, void *dat /* Gets the PGresult instance data for the provided proc. */ extern void *PQresultInstanceData(const PGresult *result, PGEventProc proc); +/* Fires RESULTCREATE events for an application-created PGresult. */ +extern int PQfireResultCreateEvents(PGconn *conn, PGresult *res); + #ifdef __cplusplus } #endif |
