diff options
| author | Ethan Lee <ethanalee@google.com> | 2026-03-23 20:01:34 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2026-03-24 12:07:17 -0700 |
| commit | 2a28a75de8607004c628480a40a1ecfc9d3cdfe1 (patch) | |
| tree | 2debc304eab96ecf310e178eac8cc4a58638fbf1 /internal | |
| parent | 9da8f15f1c5721ddc1866bda9091a7f49c63fa10 (diff) | |
| download | go-x-pkgsite-2a28a75de8607004c628480a40a1ecfc9d3cdfe1.tar.xz | |
all: pgx/v4 to v5 and upgrade pq
- In preparation for upgrade to PostgreSQL 17, upgrade stale
dependencies within pkgsite.
Change-Id: Id54cbb46182711b9808ee3bbbe2f0d5d9a04583d
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/758121
Auto-Submit: Ethan Lee <ethanalee@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
kokoro-CI: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/database/benchmark_test.go | 4 | ||||
| -rw-r--r-- | internal/database/copy.go | 4 | ||||
| -rw-r--r-- | internal/database/copy_test.go | 4 | ||||
| -rw-r--r-- | internal/database/database.go | 2 | ||||
| -rw-r--r-- | internal/database/database_test.go | 6 | ||||
| -rw-r--r-- | internal/postgres/search_test.go | 3 | ||||
| -rw-r--r-- | internal/postgres/versionstate.go | 5 |
7 files changed, 14 insertions, 14 deletions
diff --git a/internal/database/benchmark_test.go b/internal/database/benchmark_test.go index a0c5d17d..2d789949 100644 --- a/internal/database/benchmark_test.go +++ b/internal/database/benchmark_test.go @@ -9,8 +9,8 @@ import ( "database/sql" "testing" - "github.com/jackc/pgx/v4" - "github.com/jackc/pgx/v4/stdlib" + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/stdlib" "golang.org/x/pkgsite/internal/log" ) diff --git a/internal/database/copy.go b/internal/database/copy.go index 86244eae..dbcdb67d 100644 --- a/internal/database/copy.go +++ b/internal/database/copy.go @@ -11,8 +11,8 @@ import ( "strings" "time" - "github.com/jackc/pgx/v4" - "github.com/jackc/pgx/v4/stdlib" + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/stdlib" "golang.org/x/pkgsite/internal/derrors" "golang.org/x/pkgsite/internal/log" ) diff --git a/internal/database/copy_test.go b/internal/database/copy_test.go index a878985e..79b45ff1 100644 --- a/internal/database/copy_test.go +++ b/internal/database/copy_test.go @@ -11,8 +11,8 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "github.com/jackc/pgx/v4" - "github.com/jackc/pgx/v4/stdlib" + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/stdlib" ) type copyRow struct { diff --git a/internal/database/database.go b/internal/database/database.go index 917b6094..f5b646a0 100644 --- a/internal/database/database.go +++ b/internal/database/database.go @@ -18,7 +18,7 @@ import ( "sync" "time" - "github.com/jackc/pgconn" + "github.com/jackc/pgx/v5/pgconn" "github.com/lib/pq" "golang.org/x/pkgsite/internal/derrors" "golang.org/x/pkgsite/internal/log" diff --git a/internal/database/database_test.go b/internal/database/database_test.go index 600ecc4f..bd7e3c1e 100644 --- a/internal/database/database_test.go +++ b/internal/database/database_test.go @@ -18,9 +18,9 @@ import ( "time" "github.com/google/go-cmp/cmp" - "github.com/jackc/pgconn" - "github.com/jackc/pgx/v4" - "github.com/jackc/pgx/v4/stdlib" + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" + "github.com/jackc/pgx/v5/stdlib" "golang.org/x/pkgsite/internal/derrors" ) diff --git a/internal/postgres/search_test.go b/internal/postgres/search_test.go index b3990865..957961d6 100644 --- a/internal/postgres/search_test.go +++ b/internal/postgres/search_test.go @@ -7,6 +7,7 @@ package postgres import ( "context" "crypto/md5" + "database/sql" "encoding/binary" "errors" "fmt" @@ -920,7 +921,7 @@ func getSearchDocument(ctx context.Context, db *DB, path string) (*searchDocumen row := db.db.QueryRow(ctx, query, path) var ( sd searchDocument - t pq.NullTime + t sql.NullTime ) if err := row.Scan(&sd.packagePath, &sd.modulePath, &sd.version, &sd.commitTime, &sd.name, &sd.synopsis, pq.Array(&sd.licenseTypes), &sd.importedByCount, diff --git a/internal/postgres/versionstate.go b/internal/postgres/versionstate.go index 0c8870d6..a1ef14de 100644 --- a/internal/postgres/versionstate.go +++ b/internal/postgres/versionstate.go @@ -12,7 +12,6 @@ import ( "sort" "time" - "github.com/lib/pq" "go.opencensus.io/trace" "golang.org/x/pkgsite/internal" "golang.org/x/pkgsite/internal/database" @@ -303,8 +302,8 @@ const moduleVersionStateColumns = ` func scanModuleVersionState(scan func(dest ...any) error) (*internal.ModuleVersionState, error) { var ( v internal.ModuleVersionState - indexTimestamp pq.NullTime - lastProcessedAt pq.NullTime + indexTimestamp sql.NullTime + lastProcessedAt sql.NullTime numPackages sql.NullInt64 hasGoMod sql.NullBool ) |
