Minor issue: "context canceled" when NamedArgs contain a *time.Time instead of a time.Time
- Dominant language
- Go
- Stars
- 14.3k
- Forks
- 1.1k
- Avg merge
- 6d 9h
- Merged PRs (30d)
- 11
Description
At least, that issue occurred at my end (this `bug` Issue Label I picked might be the wrong category actually). Luckily, the (*Time)-vs-Time being the likely cause was my first hunch (based on the only recent change since my last test), but posting it here as it might help some websearcher later with the same issue, and might be that someone wants to look into this anyway, or ensure erroring with some actual message (or bring in [context.WithCancelCause](https://pkg.go.dev/context@go1.21.3#WithCancelCause) if not already the case =)
Usage of `pgx` via `database/sql` API, version in `go.mod` is `github.com/jackc/pgx/v5 v5.4.3`. Voidlinux, Postgres v16 in a container.
Big fan of `pgx`, appreciate it a lot!
Contributor guide
Research direction
Start with the Go module's github.com/jackc/pgx/v5 v5.4.3 dependency and reproduce the database/sql API case using NamedArgs with *time.Time instead of time.Time against PostgreSQL. Trace where the context becomes canceled and determine whether the behavior can produce a more actionable error; the issue is done when the cause or expected handling is established and covered by a verified result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, postgresql
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100