From: Florian Forster Date: Wed, 4 Feb 2009 08:32:34 +0000 (+0100) Subject: src/utils_db_query.c: Implement the (deprecated) `{Min,Max}PGVersion' options. X-Git-Tag: collectd-4.6.0~73 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=0b8442dd33105499df02180294c36d5705d596f0;p=collectd.git src/utils_db_query.c: Implement the (deprecated) `{Min,Max}PGVersion' options. This is for compatibility with old configuration of the postgresql plugin. --- diff --git a/src/utils_db_query.c b/src/utils_db_query.c index 1bd5b216..868b53bf 100644 --- a/src/utils_db_query.c +++ b/src/utils_db_query.c @@ -592,6 +592,21 @@ int udb_query_create (udb_query_t ***ret_query_list, /* {{{ */ status = udb_config_set_uint (&q->min_version, child); else if (strcasecmp ("MaxVersion", child->key) == 0) status = udb_config_set_uint (&q->max_version, child); + /* PostgreSQL compatibility code */ + else if (strcasecmp ("MinPGVersion", child->key) == 0) + { + WARNING ("db query utils: Query `%s': The `MinPGVersion' option is " + "deprecated. Please use `MinVersion' instead.", + q->name); + status = udb_config_set_uint (&q->min_version, child); + } + else if (strcasecmp ("MaxPGVersion", child->key) == 0) + { + WARNING ("db query utils: Query `%s': The `MaxPGVersion' option is " + "deprecated. Please use `MaxVersion' instead.", + q->name); + status = udb_config_set_uint (&q->max_version, child); + } else { WARNING ("db query utils: Query `%s': Option `%s' not allowed here.",