summaryrefslogtreecommitdiffstats
path: root/src/zabbix_server/timer/timer.c
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-01-08 16:13:49 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-01-08 16:13:49 +0000
commitea6bdbcf952e5ac4696cb91364c1923f6ab96321 (patch)
tree06184b10a3e0231b7c18d9cf6a66f2a3a6f97f8c /src/zabbix_server/timer/timer.c
parent8f08a8271468cf8285f000ac4c0b25e12f1d596b (diff)
- improved databases determination of configuration script (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@3664 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'src/zabbix_server/timer/timer.c')
-rw-r--r--src/zabbix_server/timer/timer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/zabbix_server/timer/timer.c b/src/zabbix_server/timer/timer.c
index 6a08fbb6..a5ff96db 100644
--- a/src/zabbix_server/timer/timer.c
+++ b/src/zabbix_server/timer/timer.c
@@ -83,7 +83,7 @@ void main_timer_loop()
now=time(NULL);
/*
-#ifdef HAVE_PGSQL
+#ifdef HAVE_POSTGRESQL
zbx_snprintf(sql,sizeof(sql),"select distinct f.itemid,f.functionid,f.parameter from functions f, items i,hosts h where h.hostid=i.hostid and h.status=%d and i.itemid=f.itemid and f.function in ('nodata','date','dayofweek','time','now') and i.lastclock+f.parameter::text::integer<=%d and i.status=%d", HOST_STATUS_MONITORED, now, ITEM_STATUS_ACTIVE);
#else
zbx_snprintf(sql,sizeof(sql),"select distinct f.itemid,f.functionid,f.parameter,f.function from functions f, items i,hosts h where h.hostid=i.hostid and h.status=%d and i.itemid=f.itemid and f.function in ('nodata','date','dayofweek','time','now') and i.lastclock+f.parameter<=%d and i.status=%d", HOST_STATUS_MONITORED, now, ITEM_STATUS_ACTIVE);