diff -ru zabbix-2.0.3.orig/database/mysql/schema.sql zabbix-2.0.3-new/database/mysql/schema.sql
--- zabbix-2.0.3.orig/database/mysql/schema.sql	2012-10-03 10:28:32.000000000 -0430
+++ zabbix-2.0.3-new/database/mysql/schema.sql	2012-11-21 17:53:22.124625772 -0430
@@ -511,16 +511,16 @@
 	`name`                   varchar(128)    DEFAULT ''                NOT NULL,
 	`width`                  integer         DEFAULT '0'               NOT NULL,
 	`height`                 integer         DEFAULT '0'               NOT NULL,
-	`yaxismin`               double(16,4)    DEFAULT '0'               NOT NULL,
-	`yaxismax`               double(16,4)    DEFAULT '0'               NOT NULL,
+	`yaxismin`               double(19,4)    DEFAULT '0'               NOT NULL,
+	`yaxismax`               double(19,4)    DEFAULT '0'               NOT NULL,
 	`templateid`             bigint unsigned                           NULL,
 	`show_work_period`       integer         DEFAULT '1'               NOT NULL,
 	`show_triggers`          integer         DEFAULT '1'               NOT NULL,
 	`graphtype`              integer         DEFAULT '0'               NOT NULL,
 	`show_legend`            integer         DEFAULT '1'               NOT NULL,
 	`show_3d`                integer         DEFAULT '0'               NOT NULL,
-	`percent_left`           double(16,4)    DEFAULT '0'               NOT NULL,
-	`percent_right`          double(16,4)    DEFAULT '0'               NOT NULL,
+	`percent_left`           double(19,4)    DEFAULT '0'               NOT NULL,
+	`percent_right`          double(19,4)    DEFAULT '0'               NOT NULL,
 	`ymin_type`              integer         DEFAULT '0'               NOT NULL,
 	`ymax_type`              integer         DEFAULT '0'               NOT NULL,
 	`ymin_itemid`            bigint unsigned                           NULL,
@@ -645,7 +645,7 @@
 	`algorithm`              integer         DEFAULT '0'               NOT NULL,
 	`triggerid`              bigint unsigned                           NULL,
 	`showsla`                integer         DEFAULT '0'               NOT NULL,
-	`goodsla`                double(16,4)    DEFAULT '99.9'            NOT NULL,
+	`goodsla`                double(19,4)    DEFAULT '99.9'            NOT NULL,
 	`sortorder`              integer         DEFAULT '0'               NOT NULL,
 	PRIMARY KEY (serviceid)
 ) ENGINE=InnoDB;
@@ -876,7 +876,7 @@
 CREATE TABLE `history` (
 	`itemid`                 bigint unsigned                           NOT NULL,
 	`clock`                  integer         DEFAULT '0'               NOT NULL,
-	`value`                  double(16,4)    DEFAULT '0.0000'          NOT NULL,
+	`value`                  double(19,4)    DEFAULT '0.0000'          NOT NULL,
 	`ns`                     integer         DEFAULT '0'               NOT NULL
 ) ENGINE=InnoDB;
 CREATE INDEX `history_1` ON `history` (`itemid`,`clock`);
@@ -885,7 +885,7 @@
 	`nodeid`                 integer                                   NOT NULL,
 	`itemid`                 bigint unsigned                           NOT NULL,
 	`clock`                  integer         DEFAULT '0'               NOT NULL,
-	`value`                  double(16,4)    DEFAULT '0.0000'          NOT NULL,
+	`value`                  double(19,4)    DEFAULT '0.0000'          NOT NULL,
 	`ns`                     integer         DEFAULT '0'               NOT NULL,
 	PRIMARY KEY (id)
 ) ENGINE=InnoDB;
@@ -995,9 +995,9 @@
 	`itemid`                 bigint unsigned                           NOT NULL,
 	`clock`                  integer         DEFAULT '0'               NOT NULL,
 	`num`                    integer         DEFAULT '0'               NOT NULL,
-	`value_min`              double(16,4)    DEFAULT '0.0000'          NOT NULL,
-	`value_avg`              double(16,4)    DEFAULT '0.0000'          NOT NULL,
-	`value_max`              double(16,4)    DEFAULT '0.0000'          NOT NULL,
+	`value_min`              double(19,4)    DEFAULT '0.0000'          NOT NULL,
+	`value_avg`              double(19,4)    DEFAULT '0.0000'          NOT NULL,
+	`value_max`              double(19,4)    DEFAULT '0.0000'          NOT NULL,
 	PRIMARY KEY (itemid,clock)
 ) ENGINE=InnoDB;
 CREATE TABLE `trends_uint` (
diff -ru zabbix-2.0.3.orig/database/postgresql/schema.sql zabbix-2.0.3-new/database/postgresql/schema.sql
--- zabbix-2.0.3.orig/database/postgresql/schema.sql	2012-10-03 10:28:32.000000000 -0430
+++ zabbix-2.0.3-new/database/postgresql/schema.sql	2012-11-21 17:55:45.458635410 -0430
@@ -511,16 +511,16 @@
 	name                     varchar(128)    DEFAULT ''                NOT NULL,
 	width                    integer         DEFAULT '0'               NOT NULL,
 	height                   integer         DEFAULT '0'               NOT NULL,
-	yaxismin                 numeric(16,4)   DEFAULT '0'               NOT NULL,
-	yaxismax                 numeric(16,4)   DEFAULT '0'               NOT NULL,
+	yaxismin                 numeric(19,4)   DEFAULT '0'               NOT NULL,
+	yaxismax                 numeric(19,4)   DEFAULT '0'               NOT NULL,
 	templateid               bigint                                    NULL,
 	show_work_period         integer         DEFAULT '1'               NOT NULL,
 	show_triggers            integer         DEFAULT '1'               NOT NULL,
 	graphtype                integer         DEFAULT '0'               NOT NULL,
 	show_legend              integer         DEFAULT '1'               NOT NULL,
 	show_3d                  integer         DEFAULT '0'               NOT NULL,
-	percent_left             numeric(16,4)   DEFAULT '0'               NOT NULL,
-	percent_right            numeric(16,4)   DEFAULT '0'               NOT NULL,
+	percent_left             numeric(19,4)   DEFAULT '0'               NOT NULL,
+	percent_right            numeric(19,4)   DEFAULT '0'               NOT NULL,
 	ymin_type                integer         DEFAULT '0'               NOT NULL,
 	ymax_type                integer         DEFAULT '0'               NOT NULL,
 	ymin_itemid              bigint                                    NULL,
@@ -645,7 +645,7 @@
 	algorithm                integer         DEFAULT '0'               NOT NULL,
 	triggerid                bigint                                    NULL,
 	showsla                  integer         DEFAULT '0'               NOT NULL,
-	goodsla                  numeric(16,4)   DEFAULT '99.9'            NOT NULL,
+	goodsla                  numeric(19,4)   DEFAULT '99.9'            NOT NULL,
 	sortorder                integer         DEFAULT '0'               NOT NULL,
 	PRIMARY KEY (serviceid)
 );
@@ -876,7 +876,7 @@
 CREATE TABLE history (
 	itemid                   bigint                                    NOT NULL,
 	clock                    integer         DEFAULT '0'               NOT NULL,
-	value                    numeric(16,4)   DEFAULT '0.0000'          NOT NULL,
+	value                    numeric(19,4)   DEFAULT '0.0000'          NOT NULL,
 	ns                       integer         DEFAULT '0'               NOT NULL
 );
 CREATE INDEX history_1 ON history (itemid,clock);
@@ -885,7 +885,7 @@
 	nodeid                   integer                                   NOT NULL,
 	itemid                   bigint                                    NOT NULL,
 	clock                    integer         DEFAULT '0'               NOT NULL,
-	value                    numeric(16,4)   DEFAULT '0.0000'          NOT NULL,
+	value                    numeric(19,4)   DEFAULT '0.0000'          NOT NULL,
 	ns                       integer         DEFAULT '0'               NOT NULL,
 	PRIMARY KEY (id)
 );
@@ -995,9 +995,9 @@
 	itemid                   bigint                                    NOT NULL,
 	clock                    integer         DEFAULT '0'               NOT NULL,
 	num                      integer         DEFAULT '0'               NOT NULL,
-	value_min                numeric(16,4)   DEFAULT '0.0000'          NOT NULL,
-	value_avg                numeric(16,4)   DEFAULT '0.0000'          NOT NULL,
-	value_max                numeric(16,4)   DEFAULT '0.0000'          NOT NULL,
+	value_min                numeric(19,4)   DEFAULT '0.0000'          NOT NULL,
+	value_avg                numeric(19,4)   DEFAULT '0.0000'          NOT NULL,
+	value_max                numeric(19,4)   DEFAULT '0.0000'          NOT NULL,
 	PRIMARY KEY (itemid,clock)
 );
 CREATE TABLE trends_uint (
diff -ru zabbix-2.0.3.orig/database/sqlite3/schema.sql zabbix-2.0.3-new/database/sqlite3/schema.sql
--- zabbix-2.0.3.orig/database/sqlite3/schema.sql	2012-10-03 10:28:32.000000000 -0430
+++ zabbix-2.0.3-new/database/sqlite3/schema.sql	2012-11-21 17:56:22.509566754 -0430
@@ -511,16 +511,16 @@
 	name                     varchar(128)    DEFAULT ''                NOT NULL,
 	width                    integer         DEFAULT '0'               NOT NULL,
 	height                   integer         DEFAULT '0'               NOT NULL,
-	yaxismin                 double(16,4)    DEFAULT '0'               NOT NULL,
-	yaxismax                 double(16,4)    DEFAULT '0'               NOT NULL,
+	yaxismin                 double(19,4)    DEFAULT '0'               NOT NULL,
+	yaxismax                 double(19,4)    DEFAULT '0'               NOT NULL,
 	templateid               bigint                                    NULL REFERENCES graphs (graphid) ON DELETE CASCADE,
 	show_work_period         integer         DEFAULT '1'               NOT NULL,
 	show_triggers            integer         DEFAULT '1'               NOT NULL,
 	graphtype                integer         DEFAULT '0'               NOT NULL,
 	show_legend              integer         DEFAULT '1'               NOT NULL,
 	show_3d                  integer         DEFAULT '0'               NOT NULL,
-	percent_left             double(16,4)    DEFAULT '0'               NOT NULL,
-	percent_right            double(16,4)    DEFAULT '0'               NOT NULL,
+	percent_left             double(19,4)    DEFAULT '0'               NOT NULL,
+	percent_right            double(19,4)    DEFAULT '0'               NOT NULL,
 	ymin_type                integer         DEFAULT '0'               NOT NULL,
 	ymax_type                integer         DEFAULT '0'               NOT NULL,
 	ymin_itemid              bigint                                    NULL REFERENCES items (itemid),
@@ -645,7 +645,7 @@
 	algorithm                integer         DEFAULT '0'               NOT NULL,
 	triggerid                bigint                                    NULL REFERENCES triggers (triggerid) ON DELETE CASCADE,
 	showsla                  integer         DEFAULT '0'               NOT NULL,
-	goodsla                  double(16,4)    DEFAULT '99.9'            NOT NULL,
+	goodsla                  double(19,4)    DEFAULT '99.9'            NOT NULL,
 	sortorder                integer         DEFAULT '0'               NOT NULL,
 	PRIMARY KEY (serviceid)
 );
@@ -876,7 +876,7 @@
 CREATE TABLE history (
 	itemid                   bigint                                    NOT NULL,
 	clock                    integer         DEFAULT '0'               NOT NULL,
-	value                    double(16,4)    DEFAULT '0.0000'          NOT NULL,
+	value                    double(19,4)    DEFAULT '0.0000'          NOT NULL,
 	ns                       integer         DEFAULT '0'               NOT NULL
 );
 CREATE INDEX history_1 ON history (itemid,clock);
@@ -885,7 +885,7 @@
 	nodeid                   integer                                   NOT NULL,
 	itemid                   bigint                                    NOT NULL,
 	clock                    integer         DEFAULT '0'               NOT NULL,
-	value                    double(16,4)    DEFAULT '0.0000'          NOT NULL,
+	value                    double(19,4)    DEFAULT '0.0000'          NOT NULL,
 	ns                       integer         DEFAULT '0'               NOT NULL
 );
 CREATE INDEX history_sync_1 ON history_sync (nodeid,id);
@@ -990,9 +990,9 @@
 	itemid                   bigint                                    NOT NULL,
 	clock                    integer         DEFAULT '0'               NOT NULL,
 	num                      integer         DEFAULT '0'               NOT NULL,
-	value_min                double(16,4)    DEFAULT '0.0000'          NOT NULL,
-	value_avg                double(16,4)    DEFAULT '0.0000'          NOT NULL,
-	value_max                double(16,4)    DEFAULT '0.0000'          NOT NULL,
+	value_min                double(19,4)    DEFAULT '0.0000'          NOT NULL,
+	value_avg                double(19,4)    DEFAULT '0.0000'          NOT NULL,
+	value_max                double(19,4)    DEFAULT '0.0000'          NOT NULL,
 	PRIMARY KEY (itemid,clock)
 );
 CREATE TABLE trends_uint (
diff -ru zabbix-2.0.3.orig/src/libs/zbxdbcache/dbcache.c zabbix-2.0.3-new/src/libs/zbxdbcache/dbcache.c
--- zabbix-2.0.3.orig/src/libs/zbxdbcache/dbcache.c	2012-10-03 10:11:34.000000000 -0430
+++ zabbix-2.0.3-new/src/libs/zbxdbcache/dbcache.c	2012-11-21 17:43:03.528266801 -0430
@@ -876,9 +876,9 @@
 
 static int	DBchk_double(double value)
 {
-	/* field with precision 16, scale 4 [NUMERIC(16,4)] */
-	const double	pg_min_numeric = -1e12;
-	const double	pg_max_numeric = 1e12;
+	/* field with precision 19, scale 4 [NUMERIC(19,4)] */
+	const double	pg_min_numeric = -1e15;
+	const double	pg_max_numeric = 1e15;
 
 	if (value <= pg_min_numeric || value >= pg_max_numeric)
 		return FAIL;
