From 0b8442dd33105499df02180294c36d5705d596f0 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Wed, 4 Feb 2009 09:32:34 +0100 Subject: [PATCH] src/utils_db_query.c: Implement the (deprecated) `{Min,Max}PGVersion' options. This is for compatibility with old configuration of the postgresql plugin. --- src/utils_db_query.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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.", -- 2.30.2