Bruce Momjian <bruce(at)momjian(dot)us> writes:
> Are people going to be happy that log_statement and
> log_min_duration_statement output the statement twice?
If those are the only cases you're worried about, a far simpler solution
is to clear debug_query_string before instead of after emitting those
log messages.
regards, tom lane