Skip to content

Commit 00b606d

Browse files
authored
Merge pull request #2590 from cbandy/trace-exec-err
Call TraceQueryEnd during Exec errors
2 parents 53acbaf + d62abe8 commit 00b606d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

conn.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,9 @@ func (c *Conn) Exec(ctx context.Context, sql string, arguments ...any) (pgconn.C
475475
}
476476

477477
if err := c.deallocateInvalidatedCachedStatements(ctx); err != nil {
478+
if c.queryTracer != nil {
479+
c.queryTracer.TraceQueryEnd(ctx, c, TraceQueryEndData{Err: err})
480+
}
478481
return pgconn.CommandTag{}, err
479482
}
480483

0 commit comments

Comments
 (0)