jackc / jackc/pgx

Feature Request: Remove Truncation from Args When Logging

Open
#998 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
14.3k
Forks
1.1k
Avg merge
6d 9h
Merged PRs (30d)
11

Description

In `func logQueryArgs(args []interface{})` it looks like `pgx` deliberately truncates long args. We need to be able to use the full args to debug our queries in staging.

Can we remove this truncation completely or add a config param that would allow full args to be logger?

I'm happy to make the change in a pr. Just let me know which you prefer.

Contributor guide

Open the contributing guide

Research direction

Start at the mentioned `logQueryArgs(args []interface{})` entry point and trace how its output is sent to the logger. Determine whether the intended behavior is always-full arguments or an opt-in configuration, then verify that the selected behavior is covered by the existing logging tests, if present.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, postgresql
Domain
databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.