sqlboiler icon indicating copy to clipboard operation
sqlboiler copied to clipboard

Migrate lib/pq to jackc/pgx/v5

Open pan93412 opened this issue 1 year ago • 3 comments

  • Tests are updated to reflect the latest PostgreSQL (15) default value.
  • Migrate lib/pq to pgx/v5's compatibility layer (to prevent rewriting too many things)
  • Update Go lockfiles to drop out lib/pq's dependencies

It has not been thoroughly tested (except for the tests). If there are any other real-world cases that can be used for testing, I would greatly appreciate it.

Fixed #996 Fixed #759

pan93412 avatar Jul 27 '24 09:07 pan93412

Error: ../../../go/pkg/mod/github.com/jackc/pgx/[email protected]/pgconn/pgconn.go:159:57: undefined: errors.Join

Seems pgx/v5 has been adopted to a newer Go version.

pan93412 avatar Jul 31 '24 08:07 pan93412

@stephenafamo can you check this?

090809 avatar Sep 30 '24 12:09 090809

@stephenafamo can you check this?

I don't think it can be merged soon. This project needs to upgrade the Go version to use pgx, which is somewhat breaking.

My branch currently matches the master branch of sqlboiler. You can use go get as a workaround. 🥰

pan93412 avatar Sep 30 '24 13:09 pan93412

The driver is only used to read the database during generation and the user is free to use whatever *sql.DB they want at runtime.

Since there is no benefit to upgrading, we will just stick with lib/pq unless something else forces us to upgrade the Go version.

stephenafamo avatar Oct 23 '24 09:10 stephenafamo