Displaying 8 results from an estimated 8 matches for "pqclear".
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)
2004 Jun 23
0
UPDATE Patch for postgres enabled app_voicemail.c
...ry);
! if (PGSQLres!=NULL) {
! if (PQresultStatus(PGSQLres) == PGRES_BAD_RESPONSE ||
! PQresultStatus(PGSQLres) == PGRES_NONFATAL_ERROR ||
! PQresultStatus(PGSQLres) == PGRES_FATAL_ERROR) {
!
! ast_log(LOG_WARNING,"PGSQL_query: Query Error (%s) Calling
PQreset\n",PQcmdStatus(PGSQLres));
! PQclear(PGSQLres);
! PQreset(dbhandler);
! ast_mutex_unlock(&postgreslock);
! return;
! } else {
! numFields = PQnfields(PGSQLres);
! //fprintf(stdout,"postgres sql_append_user: query found %d rows with %d
fields\n",PQntuples(PGSQLres), numFields);
! for (k = 0; k< (PQntuples(PGSQLres)); k...
2004 Jun 23
0
Patch for postgres enabled app_voicemail.c
...ry);
! if (PGSQLres!=NULL) {
! if (PQresultStatus(PGSQLres) == PGRES_BAD_RESPONSE ||
! PQresultStatus(PGSQLres) == PGRES_NONFATAL_ERROR ||
! PQresultStatus(PGSQLres) == PGRES_FATAL_ERROR) {
!
! ast_log(LOG_WARNING,"PGSQL_query: Query Error (%s) Calling
PQreset\n",PQcmdStatus(PGSQLres));
! PQclear(PGSQLres);
! PQreset(dbhandler);
! ast_mutex_unlock(&postgreslock);
! return;
! } else {
! numFields = PQnfields(PGSQLres);
! //fprintf(stdout,"postgres sql_append_user: query found %d rows with %d
fields\n",PQntuples(PGSQLres), numFields);
! for (k = 0; k< (PQntuples(PGSQLres)); k...
2007 Mar 08
2
RE: Apache Install error on Centos 4.3
...-1.so: undefined reference to `PQntuples'
/usr/lib/libaprutil-1.so: undefined reference to `PQreset'
/usr/lib/libaprutil-1.so: undefined reference to `PQsendQueryParams'
/usr/lib/libaprutil-1.so: undefined reference to `PQexecParams'
/usr/lib/libaprutil-1.so: undefined reference to `PQclear'
/usr/lib/libaprutil-1.so: undefined reference to `PQresultStatus'
/usr/lib/libaprutil-1.so: undefined reference to `PQgetvalue'
/usr/lib/libaprutil-1.so: undefined reference to `PQstatus'
/usr/lib/libaprutil-1.so: undefined reference to `PQnfields'
/usr/lib/libaprutil-1.so: und...
2010 Mar 06
2
memory error in for loop
....8 Mbytes of vectors used (13%)
*** glibc detected *** /usr/lib/R/bin/exec/R: double free or
corruption (!prev): 0x094f8c38 ***
======= Backtrace: =========
/lib/i686/cmov/libc.so.6[0xb7486824]
/lib/i686/cmov/libc.so.6[0xb74880b3]
/lib/i686/cmov/libc.so.6(cfree+0x6d)[0xb748b0dd]
/usr/lib/libpq.so.5(PQclear+0xf6)[0xb6e53976]
/home/ptittmann/R/i486-pc-linux-gnu-library/2.10/RdbiPgSQL/libs/RdbiPgSQL.so(PgSQLclearResult+0x25)[0xb6fc2665]
/usr/lib/R/lib/libR.so(R_RunWeakRefFinalizer+0x161)[0xb76721f1]
/usr/lib/R/lib/libR.so[0xb7672357]
/usr/lib/R/lib/libR.so[0xb76743fe]
/usr/lib/R/lib/libR.so(Rf_allocVect...
2010 Mar 26
2
Fix for the consume_results leak
...rc/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) == CONNECTION_BAD)
io_remove_closed(&...
2010 Apr 14
4
PostgreSQL driver supporting [round-robin] load balancing and redundancy [LONG]
...{
+ struct sql_result api;
+ struct multi_pgsql_pgc *pgc;
+
+ PGresult *pgr;
+ unsigned row, n_rows;
+ char const **values, *errmsg;
+};
+
+/*** methods/ subroutines */
+static void multi_pgsql_result_free(struct sql_result *r)
+{
+ struct multi_pgsql_result *result;
+
+ result = (void *)r;
+
+ PQclear(result->pgr);
+ if (result->values) i_free(result->values);
+ i_free(result);
+}
+
+static void multi_pgsql_result_nop(struct sql_result *r)
+{
+ (void)r;
+}
+
+
+static int multi_pgsql_result_next_row(struct sql_result *r)
+{
+ struct multi_pgsql_result *result;
+ unsigned row;
+
+ dprint...
2005 Mar 05
2
cant compile app_meetme2
...me2.c:162: warning: implicit declaration of function `PQexec'
app_meetme2.c:163: warning: implicit declaration of function `PQresultStatus'
app_meetme2.c:163: error: `PGRES_TUPLES_OK' undeclared (first use in this
functi
on)
app_meetme2.c:166: warning: implicit declaration of function `PQclear'
app_meetme2.c:171: warning: implicit declaration of function `PQntuples'
app_meetme2.c:179: warning: implicit declaration of function `PQgetvalue'
app_meetme2.c:179: warning: passing arg 1 of `atoi' makes pointer from
integer w
ithout a cast
app_meetme2.c:180: warning: passing arg...