Displaying 4 results from an estimated 4 matches for "pqgetresult".
Did you mean:
getresult
2010 Mar 25
2
A questions about consume_results (driver-pgsql.c)
Code
--------------
static void consume_results(struct pgsql_db *db)
{
do {
if (!PQconsumeInput(db->pg))
break;
if (PQisBusy(db->pg))
return;
} while (PQgetResult(db->pg) != NULL);
if (PQstatus(db->pg) == CONNECTION_BAD)
io_remove_closed(&db->io);
else
io_remove(&db->io);
db->querying = FALSE;
if (db->queue != NULL && db->connected)
queue_send_next(db);
}
---------------
This is the only part of the driver-pg...
2010 Mar 26
2
Fix for the consume_results leak
...o 1.2.11 and 2.0.beta4).
-----
--- dovecot/src/lib-sql/driver-pgsql.c 15 Mar 2010 18:18:14 -0000 1.1.1.2
+++ dovecot/src/lib-sql/driver-pgsql.c 26 Mar 2010 14:13:18 -0000 1.1.1.2.4.1
@@ -247,6 +247,17 @@
return 0;
}
+static inline int more_results(PGconn *pg)
+{
+ PGresult *pgres;
+
+ pgres = PQgetResult(pg);
+ if (!pgres) return 0;
+
+ PQclear(pgres);
+ return 1;
+}
+
static void consume_results(struct pgsql_db *db)
{
do {
@@ -255,7 +266,7 @@
if (PQisBusy(db->pg))
return;
- } while (PQgetResult(db->pg) != NULL);
+ } while (more_results(db->pg));
if (PQstatus(db->pg) ==...
2007 Mar 08
2
RE: Apache Install error on Centos 4.3
...e/Desktop/httpd-2.2.4/srclib/pcre/libpcre.la
/usr/lib/libaprutil-1.la -lldap -llber -ldb-4.2 -lexpat
/usr/lib/libapr-1.la-lpthread -ldl
/usr/bin/ld: warning: libpq.so.4, needed by /usr/lib/libaprutil-1.so, not
found (try using -rpath or -rpath-link)
/usr/lib/libaprutil-1.so: undefined reference to `PQgetResult'
/usr/lib/libaprutil-1.so: undefined reference to `PQconnectdb'
/usr/lib/libaprutil-1.so: undefined reference to `PQexec'
/usr/lib/libaprutil-1.so: undefined reference to `PQexecPrepared'
/usr/lib/libaprutil-1.so: undefined reference to `PQntuples'
/usr/lib/libaprutil-1.so: unde...
2010 Apr 14
4
PostgreSQL driver supporting [round-robin] load balancing and redundancy [LONG]
...start_pgc_connect(pgc);
+}
+
+/**** result processing */
+static void done_with_query(struct multi_pgsql_pgc *pgc)
+{
+ struct multi_pgsql_query *qry;
+
+ qry = pgc->qry;
+ pgc->qry = NULL;
+
+ destroy_query(qry);
+}
+
+static inline int got_result(PGconn *pgc)
+{
+ PGresult *pgr;
+
+ pgr = PQgetResult(pgc);
+ if (!pgr) return 0;
+
+ PQclear(pgr);
+ return 1;
+}
+
+static void eat_results(struct multi_pgsql_pgc *pgc)
+{
+ PGconn *the_pgc;
+ PGresult *pgr;
+ int rc;
+
+ dprintf(("%s: %p", __func__, pgc));
+
+ the_pgc = pgc->pgc;
+ do {
+ rc = PQconsumeInput(the_pgc);
+ if (rc == 0)...