Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to pgx/v5 #2439

Merged
merged 2 commits into from
Apr 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ linters-settings:
- github.com/FerretDB/FerretDB/internal/handlers/tigris/tigrisdb
- github.com/FerretDB/FerretDB/internal/handlers/tigris/tjson
- github.com/FerretDB/FerretDB/internal/types/fjson
- github.com/jackc/pgconn
- github.com/jackc/pgproto3
- github.com/jackc/pgtype
- github.com/jackc/pgx/v4
- github.com/tigrisdata/tigris-client-go/api/client/v1/api
- github.com/tigrisdata/tigris-client-go/filter # We use our own filter without generics (see tigris/tigrisdb/filter)
exhaustive:
Expand Down Expand Up @@ -78,6 +82,8 @@ linters-settings:
alias: api
- pkg: github.com/prometheus/client_model/go
alias: dto
- pkg: github.com/jackc/pgx-zap
alias: zapadapter
# ineffassign
lll:
line-length: 130
Expand Down
2 changes: 1 addition & 1 deletion cmd/envtool/envtool.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
"time"

"github.com/alecthomas/kong"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v5"
"github.com/prometheus/client_golang/prometheus"
"github.com/tigrisdata/tigris-client-go/config"
"go.uber.org/zap"
Expand Down
6 changes: 3 additions & 3 deletions ferretdb/ferretdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ type Config struct {

// PostgreSQL connection string for `pg` handler.
// See:
// * https://pkg.go.dev/github.com/jackc/pgx/v4/pgxpool#ParseConfig
// * https://pkg.go.dev/github.com/jackc/pgx/v4#ParseConfig
// * https://pkg.go.dev/github.com/jackc/pgconn#ParseConfig
// * https://pkg.go.dev/github.com/jackc/pgx/v5/pgxpool#ParseConfig
// * https://pkg.go.dev/github.com/jackc/pgx/v5#ParseConfig
// * https://pkg.go.dev/github.com/jackc/pgx/v5/pgconn#ParseConfig
PostgreSQLURL string // For example: `postgres://hostname:5432/ferretdb`.

// Tigris parameters for `tigris` handler.
Expand Down
14 changes: 6 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ require (
github.com/SAP/go-hdb v1.2.0
github.com/alecthomas/kong v0.7.1
github.com/google/uuid v1.3.0
github.com/jackc/pgconn v1.14.0
github.com/jackc/pgerrcode v0.0.0-20220416144525-469b46aa5efa
github.com/jackc/pgx/v4 v4.18.1
github.com/jackc/pgx-zap v0.0.0-20221202020421-94b1cb2f889f
github.com/jackc/pgx/v5 v5.3.1
github.com/pmezard/go-difflib v1.0.0
github.com/prometheus/client_golang v1.14.0
github.com/prometheus/client_model v0.3.0
Expand Down Expand Up @@ -45,13 +45,9 @@ require (
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.1 // indirect
github.com/invopop/yaml v0.2.0 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
github.com/jackc/pgio v1.0.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgproto3/v2 v2.3.2 // indirect
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
github.com/jackc/pgtype v1.14.0 // indirect
github.com/jackc/puddle v1.3.0 // indirect
github.com/jackc/puddle/v2 v2.2.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
Expand All @@ -61,10 +57,12 @@ require (
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/perimeterx/marshmallow v1.1.4 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect
go.opentelemetry.io/otel/trace v1.14.0 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/oauth2 v0.5.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/text v0.9.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230222225845-10f96fb3dbec // indirect
Expand Down
149 changes: 13 additions & 136 deletions go.sum

Large diffs are not rendered by default.

12 changes: 4 additions & 8 deletions integration/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,12 @@ require (
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.1 // indirect
github.com/invopop/yaml v0.2.0 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
github.com/jackc/pgconn v1.14.0 // indirect
github.com/jackc/pgerrcode v0.0.0-20220416144525-469b46aa5efa // indirect
github.com/jackc/pgio v1.0.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgproto3/v2 v2.3.2 // indirect
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
github.com/jackc/pgtype v1.14.0 // indirect
github.com/jackc/pgx/v4 v4.18.1 // indirect
github.com/jackc/puddle v1.3.0 // indirect
github.com/jackc/pgx-zap v0.0.0-20221202020421-94b1cb2f889f // indirect
github.com/jackc/pgx/v5 v5.3.1 // indirect
github.com/jackc/puddle/v2 v2.2.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.13.6 // indirect
Expand All @@ -73,7 +69,7 @@ require (
github.com/xdg-go/stringprep v1.0.3 // indirect
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
go.opentelemetry.io/otel/trace v1.14.0 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/crypto v0.7.0 // indirect
golang.org/x/net v0.9.0 // indirect
Expand Down
Loading