projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
44f3233
)
postgresql plugin: Let the read callback fail if all queries failed.
author
Sebastian Harl
<sh@tokkee.org>
Tue, 30 Mar 2010 20:09:55 +0000
(22:09 +0200)
committer
Sebastian Harl
<sh@tokkee.org>
Tue, 30 Mar 2010 20:09:55 +0000
(22:09 +0200)
src/postgresql.c
patch
|
blob
|
history
diff --git
a/src/postgresql.c
b/src/postgresql.c
index
99e40fe
..
d390abd
100644
(file)
--- a/
src/postgresql.c
+++ b/
src/postgresql.c
@@
-463,6
+463,8
@@
static int c_psql_exec_query (c_psql_database_t *db, udb_query_t *q,
static int c_psql_read (user_data_t *ud)
{
c_psql_database_t *db;
+
+ int success = 0;
int i;
if ((ud == NULL) || (ud->data == NULL)) {
@@
-489,8
+491,12
@@
static int c_psql_read (user_data_t *ud)
&& (udb_query_check_version (q, db->server_version) <= 0))
continue;
- c_psql_exec_query (db, q, prep_area);
+ if (0 == c_psql_exec_query (db, q, prep_area))
+ success = 1;
}
+
+ if (! success)
+ return -1;
return 0;
} /* c_psql_read */