projects
/
ftsbench.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add count of found rows
[ftsbench.git]
/
pgdriver.c
diff --git
a/pgdriver.c
b/pgdriver.c
index
0a373b6
..
ed15a57
100644
(file)
--- a/
pgdriver.c
+++ b/
pgdriver.c
@@
-260,7
+260,13
@@
execQuery(ftsDB* adb, char ** words, int flags) {
fprintf(stderr, "Execution of prepared statement failed: %s\n", PQerrorMessage(db->conn));
exit(1);
}
fprintf(stderr, "Execution of prepared statement failed: %s\n", PQerrorMessage(db->conn));
exit(1);
}
+ } else if ( PQntuples(res) == 1 ) {
+ db->db.nres += atoi( PQgetvalue(res,0,0) );
+ } else {
+ fprintf(stderr,"Bad PQntuples %d\n", PQntuples(res));
+ exit(1);
}
}
+
PQclear(res);
db->emptyquery = 0;
PQclear(res);
db->emptyquery = 0;