diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-11-18 12:32:21 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-11-18 12:32:21 +0100 |
commit | 2f1c53dbfe5f1e4bd79adaf55a1aa48de8d83144 (patch) | |
tree | ba6f5b6f310683d98a390908dc9965ecb1e86137 /plugins/ompgsql | |
parent | 4cfbf894fd0caebaf65e1b7ffcb5725a530cf67d (diff) | |
parent | 48319cd31f3d15f1417d4ebd8003d93978ad36a9 (diff) | |
download | rsyslog-2f1c53dbfe5f1e4bd79adaf55a1aa48de8d83144.tar.gz rsyslog-2f1c53dbfe5f1e4bd79adaf55a1aa48de8d83144.tar.bz2 rsyslog-2f1c53dbfe5f1e4bd79adaf55a1aa48de8d83144.zip |
Merge branch 'v2-stable' into v3-stable
Conflicts:
ChangeLog
Diffstat (limited to 'plugins/ompgsql')
-rw-r--r-- | plugins/ompgsql/ompgsql.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/ompgsql/ompgsql.c b/plugins/ompgsql/ompgsql.c index f8685672..7658f036 100644 --- a/plugins/ompgsql/ompgsql.c +++ b/plugins/ompgsql/ompgsql.c @@ -167,12 +167,12 @@ rsRetVal writePgSQL(uchar *psz, instanceData *pData) dbgprintf("writePgSQL: %s", psz); /* try insert */ - PQexec(pData->f_hpgsql, (char*)psz); + PQclear(PQexec(pData->f_hpgsql, (char*)psz)); if(PQstatus(pData->f_hpgsql) != CONNECTION_OK) { /* error occured, try to re-init connection and retry */ closePgSQL(pData); /* close the current handle */ CHKiRet(initPgSQL(pData, 0)); /* try to re-open */ - PQexec(pData->f_hpgsql, (char*)psz); + PQclear(PQexec(pData->f_hpgsql, (char*)psz)); if(PQstatus(pData->f_hpgsql) != CONNECTION_OK) { /* re-try insert */ /* we failed, giving up for now */ reportDBError(pData, 0); |