Paolo, I think the problem is in the SELECT. SELECT returns PGRES_TUPLES_OK, which means, a PGRES_COMMAND_OK plus result data.
I dont know another way to circumvent this without recompiling pmacct. The change here is in line 746 if (PQresultStatus(PGret) != PGRES_COMMAND_OK) { I just want to fix it because it is filling my log too fast. I saw people using dynamic tables. I'm curious how they are using it with log enabled. Maybe they're creating a new table in every insert... or they are not logging. Cheers. 2010/5/1 Paolo Lucente <pa...@pmacct.net>: > Hi Sergio, > > Thanks indeed for sharing the function. > > It logs because the PostgreSQL PQexec() function is returning pmacct > something else than PGRES_COMMAND_OK. One suggestion might be to play > with the exit/return code of the PL/PGSQL function. The error string > ultimately is empty (and that is passed onto pmacct by the PostgreSQL > API) meaning it should be working fine. > > Cheers, > Paolo > > > On Fri, Apr 30, 2010 at 02:40:50PM -0300, Sergio Charpinel Jr. wrote: > >> I did the function. But I'm calling it with select >> function_name(table_name) , and I getting errors in nfacctd.log: >> >> [ ... ] >> >> Maybe because of the select. Just wanna know why it is still logging? > > -- Sergio Roberto Charpinel Jr. _______________________________________________ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists