diff --git a/tracelog/tracelog.go b/tracelog/tracelog.go index a68fc6a6a..5f2bd1cd9 100644 --- a/tracelog/tracelog.go +++ b/tracelog/tracelog.go @@ -94,7 +94,20 @@ func LogLevelFromString(s string) (LogLevel, error) { func logQueryArgs(args []any) []any { logArgs := make([]any, 0, len(args)) - for _, a := range args { + for i, a := range args { + if i == 0 { + switch a.(type) { + case pgx.QueryResultFormats: + continue + case pgx.QueryResultFormatsByOID: + continue + case pgx.QueryExecMode: + continue + case pgx.QueryRewriter: + continue + } + } + switch v := a.(type) { case []byte: if len(v) < 64 {