jackc / jackc/pgx

custom type unable to encode in pgx v5

Open
#1,601 15 comments 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

```
type Time time.Time

type Type interface {
fmt.Stringer
json.Marshaler
json.Unmarshaler
sql.Scanner
driver.Valuer
schema.GormDataTypeInterface
}

// Implemented these interfaces
var _ Type = (*Time)(nil)
...
```

unable to encode Time{wall:0x0, ext:0, loc:(*time.Location)(nil)} into binary format for timestamp (OID 1114): cannot find encode plan

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported failure with the shown Time type and inspect pgx v5's timestamp encoding path for OID 1114. Determine whether the custom type should be supported through its implemented interfaces; done means a focused regression test passes or the limitation and required usage are documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, postgresql
Domain
databases
Issue type
Bug
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.