Volkan YAZICI <yazicivo@xxxxxxxxxx> writes: > While log_statements logs parameter values with the logged queries, I > cannot see parameter values logged for erronous queries and queries > catched by log_min_duration_statements. What PG version are you using? Since 8.2 log_duration should show parameter values. As for the other, you'd have to turn on log_statements so that the parameters get logged in advance of the failure. Once the transaction has failed we can't call user-defined output functions, since they might try to do things that don't work inside a failed transaction. regards, tom lane