From a1b6a03888ebeab9d65c2ae2f3376cc46e98bce4 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Tue, 26 Aug 2008 16:15:37 +0200 Subject: [PATCH] postgresql plugin: Check for and report MinPGVersion > MaxPGVersion. Signed-off-by: Sebastian Harl Signed-off-by: Florian Forster --- src/postgresql.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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); -- 2.11.0