From: Sebastian Harl Date: Tue, 26 Aug 2008 14:15:37 +0000 (+0200) Subject: postgresql plugin: Check for and report MinPGVersion > MaxPGVersion. X-Git-Tag: collectd-4.5.0~27 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a1b6a03888ebeab9d65c2ae2f3376cc46e98bce4;p=collectd.git postgresql plugin: Check for and report MinPGVersion > MaxPGVersion. Signed-off-by: Sebastian Harl Signed-off-by: Florian Forster --- diff --git a/src/postgresql.c b/src/postgresql.c index b1de07fd..409a5de3 100644 --- a/src/postgresql.c +++ b/src/postgresql.c @@ -774,6 +774,14 @@ static int c_psql_config_query (oconfig_item_t *ci) log_warn ("Ignoring unknown config key \"%s\".", c->key); } + if (query->min_pg_version > query->max_pg_version) { + log_err ("Query \"%s\": MinPGVersion > MaxPGVersion.", + query->name); + c_psql_query_delete (query); + --queries_num; + return 1; + } + if (NULL == query->query) { log_err ("Query \"%s\" does not include an SQL query string - " "please check your configuration.", query->name);