When i run a query , i just only want to the affected rows are logged to log file,What can i do ? .Is there a parameter in postgresql.conf to do that ? .Thanks in advance
AFAIK, I don't think we can log only affected rows of the query. But you can log the EXPLAIN ANALYZE output of the query which includes affected rows using AUTO_EXPLAIN contrib module.
Eg:-
postgres=# set auto_explain.log_analyze TO on;
SET
postgres=# load 'auto_explain';
LOAD
postgres=# select count(*) from cities ;
count
-------
2
(1 row)
In logs:
2012-12-06 03:27:57.104 IST [17410]: [78-1] db=postgres,user=postgres LOG: statement: select count(*) from cities ;
2012-12-06 03:27:57.105 IST [17410]: [79-1] db=postgres,user=postgres LOG: duration: 0.024 ms plan: