Lines 123-128
Link Here
|
123 |
*/ |
123 |
*/ |
124 |
int DBexecute(char *query) |
124 |
int DBexecute(char *query) |
125 |
{ |
125 |
{ |
|
|
126 |
#ifdef HAVE_PGSQL |
127 |
PGresult *result; |
128 |
#endif |
129 |
|
126 |
/* zabbix_set_log_level(LOG_LEVEL_DEBUG);*/ |
130 |
/* zabbix_set_log_level(LOG_LEVEL_DEBUG);*/ |
127 |
zabbix_log( LOG_LEVEL_DEBUG, "Executing query:%s",query); |
131 |
zabbix_log( LOG_LEVEL_DEBUG, "Executing query:%s",query); |
128 |
#ifdef HAVE_MYSQL |
132 |
#ifdef HAVE_MYSQL |
Lines 138-145
Link Here
|
138 |
} |
142 |
} |
139 |
#endif |
143 |
#endif |
140 |
#ifdef HAVE_PGSQL |
144 |
#ifdef HAVE_PGSQL |
141 |
PGresult *result; |
|
|
142 |
|
143 |
result = PQexec(conn,query); |
145 |
result = PQexec(conn,query); |
144 |
|
146 |
|
145 |
if( result==NULL) |
147 |
if( result==NULL) |
Lines 168-173
Link Here
|
168 |
*/ |
170 |
*/ |
169 |
DB_RESULT *DBselect(char *query) |
171 |
DB_RESULT *DBselect(char *query) |
170 |
{ |
172 |
{ |
|
|
173 |
#ifdef HAVE_PGSQL |
174 |
PGresult *result; |
175 |
#endif |
171 |
/* zabbix_set_log_level(LOG_LEVEL_DEBUG);*/ |
176 |
/* zabbix_set_log_level(LOG_LEVEL_DEBUG);*/ |
172 |
zabbix_log( LOG_LEVEL_DEBUG, "Executing query:%s",query); |
177 |
zabbix_log( LOG_LEVEL_DEBUG, "Executing query:%s",query); |
173 |
#ifdef HAVE_MYSQL |
178 |
#ifdef HAVE_MYSQL |
Lines 185-192
Link Here
|
185 |
return mysql_store_result(&mysql); |
190 |
return mysql_store_result(&mysql); |
186 |
#endif |
191 |
#endif |
187 |
#ifdef HAVE_PGSQL |
192 |
#ifdef HAVE_PGSQL |
188 |
PGresult *result; |
|
|
189 |
|
190 |
result = PQexec(conn,query); |
193 |
result = PQexec(conn,query); |
191 |
|
194 |
|
192 |
if( result==NULL) |
195 |
if( result==NULL) |