Upgrade pgx to v5.6.0 to fix nil arg handling

Open
#303 2 comments 1 reaction 1 assignee View on GitHub

@jinzhu is already working on this.

Since Mar 9, 2025.

Assessment

This issue has not been assessed yet.

Description

Description

gorm.io/driver/postgres currently depends on pgx v5.5.5, which has a breaking change in how nil values are handled. For example previously, nil values for jsonB columns were converted to {} via Valuer.Value(), but in pgx v5, nil is now inserted as NULL, causing NOT NULL constraint violations.

This issue was addressed in pgx v5.6.0 (jackc/pgx#1367), but gorm.io/driver/postgres has not yet upgraded to this version.

Dominant language
Go
Stars
298
Forks
158
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from go-gorm/postgres

All issues in go-gorm/postgres

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.