aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_config_pgsql.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-01 18:19:12 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-01 18:19:12 +0000
commit6999ba0d4ad85f6434e765d858aec69b7caf13cd (patch)
tree7eb29df788e4cccfb7fe7b40c3b4f167e8616bb4 /res/res_config_pgsql.c
parent0dc63dd534d20afee9ed949b0eac30c44c59a0d0 (diff)
Merged revisions 284473 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r284473 | tilghman | 2010-09-01 13:16:37 -0500 (Wed, 01 Sep 2010) | 12 lines Merged revisions 284472 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r284472 | tilghman | 2010-09-01 13:13:35 -0500 (Wed, 01 Sep 2010) | 5 lines Don't warn on floats and timestamps (closes issue #17082) Reported by: coolmig ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@284474 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_config_pgsql.c')
-rw-r--r--res/res_config_pgsql.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/res/res_config_pgsql.c b/res/res_config_pgsql.c
index e356e8f83..b4398e8c9 100644
--- a/res/res_config_pgsql.c
+++ b/res/res_config_pgsql.c
@@ -1179,12 +1179,16 @@ static int require_pgsql(const char *database, const char *tablename, va_list ap
size, column->type);
res = -1;
}
- } else if (strncmp(column->type, "float", 5) == 0 && !ast_rq_is_int(type) && type != RQ_FLOAT) {
- ast_log(LOG_WARNING, "Column %s cannot be a %s\n", column->name, column->type);
- res = -1;
- } else if (strncmp(column->type, "timestamp", 9) == 0 && type != RQ_DATETIME) {
- ast_log(LOG_WARNING, "Column %s cannot be a %s\n", column->name, column->type);
- res = -1;
+ } else if (strncmp(column->type, "float", 5) == 0) {
+ if (!ast_rq_is_int(type) && type != RQ_FLOAT) {
+ ast_log(LOG_WARNING, "Column %s cannot be a %s\n", column->name, column->type);
+ res = -1;
+ }
+ } else if (strncmp(column->type, "timestamp", 9) == 0) {
+ if (type != RQ_DATETIME && type != RQ_DATE) {
+ ast_log(LOG_WARNING, "Column %s cannot be a %s\n", column->name, column->type);
+ res = -1;
+ }
} else { /* There are other types that no module implements yet */
ast_log(LOG_WARNING, "Possibly unsupported column type '%s' on column '%s'\n", column->type, column->name);
res = -1;