Skip to content

db: migrate dbconn from lib/pq to jackc/pgx

Warren Gifford requested to merge asdine/move-to-pgx into main

Created by: asdine

This PR migrates dbconn's PostgreSQL driver from lib/pq to jackc/pgx.

Most important changes:

  • We are still using lib/pq for passing arrays to db.Exec and db.Query because pgx doesn't provide a nice way of doing so. This can be improved in another PR by adding some helpers to dbutil.
  • timestamptz columns are scanned as time.Time instances with local timestamp, which can break some tests that expect a UTC value.

Fixes #16575 (closed)

Merge request reports

Loading