"Ed L." <pgsql(at)bluepolka(dot)net> writes:
> ...the transaction is not printed with the duration (it prints 0
> instead).
It's already out of the transaction by the time it prints the duration,
if you're talking about a command that's not within an explicit BEGIN
block. I think this is correct --- to do otherwise, we'd not be
counting the transaction commit as part of the command duration, which
would surely be quite misleading.
regards, tom lane