[asterisk-commits] tilghman: branch 1.6.2 r284472 - /branches/1.6.2/res/res_config_pgsql.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Sep 1 13:13:42 CDT 2010


Author: tilghman
Date: Wed Sep  1 13:13:35 2010
New Revision: 284472

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=284472
Log:
Don't warn on floats and timestamps

(closes issue #17082)
Reported by: coolmig

Modified:
    branches/1.6.2/res/res_config_pgsql.c

Modified: branches/1.6.2/res/res_config_pgsql.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/res/res_config_pgsql.c?view=diff&rev=284472&r1=284471&r2=284472
==============================================================================
--- branches/1.6.2/res/res_config_pgsql.c (original)
+++ branches/1.6.2/res/res_config_pgsql.c Wed Sep  1 13:13:35 2010
@@ -1191,9 +1191,16 @@
 							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, "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;




More information about the asterisk-commits mailing list