Skip to content

Commit d6967f2

Browse files
author
Pickle Rick
committed
security: migrate to pgx/v5 and update Go to 1.26.1 to resolve vulnerabilities
1 parent 2ccb46f commit d6967f2

File tree

7 files changed

+10
-155
lines changed

7 files changed

+10
-155
lines changed

go.mod

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/sqlc-dev/sqlc
22

3-
go 1.26.0
3+
go 1.26.1
44

55
require (
66
github.com/antlr4-go/antlr/v4 v4.13.1
@@ -10,8 +10,7 @@ require (
1010
github.com/go-sql-driver/mysql v1.9.3
1111
github.com/google/cel-go v0.27.0
1212
github.com/google/go-cmp v0.7.0
13-
github.com/jackc/pgx/v4 v4.18.3
14-
github.com/jackc/pgx/v5 v5.8.0
13+
github.com/jackc/pgx/v5 v5.9.0
1514
github.com/jinzhu/inflection v1.0.0
1615
github.com/lib/pq v1.11.2
1716
github.com/ncruces/go-sqlite3 v0.30.5
@@ -34,13 +33,8 @@ require (
3433
cel.dev/expr v0.25.1 // indirect
3534
filippo.io/edwards25519 v1.1.1 // indirect
3635
github.com/inconshreveable/mousetrap v1.1.0 // indirect
37-
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
38-
github.com/jackc/pgconn v1.14.3 // indirect
39-
github.com/jackc/pgio v1.0.0 // indirect
4036
github.com/jackc/pgpassfile v1.0.0 // indirect
41-
github.com/jackc/pgproto3/v2 v2.3.3 // indirect
4237
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
43-
github.com/jackc/pgtype v1.14.0 // indirect
4438
github.com/jackc/puddle/v2 v2.2.2 // indirect
4539
github.com/ncruces/julianday v1.0.0 // indirect
4640
github.com/pingcap/errors v0.11.5-0.20240311024730-e056997136bb // indirect
@@ -53,7 +47,6 @@ require (
5347
go.uber.org/atomic v1.11.0 // indirect
5448
go.uber.org/multierr v1.11.0 // indirect
5549
go.uber.org/zap v1.27.0 // indirect
56-
golang.org/x/crypto v0.47.0 // indirect
5750
golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b // indirect
5851
golang.org/x/net v0.48.0 // indirect
5952
golang.org/x/sys v0.40.0 // indirect

go.sum

Lines changed: 2 additions & 142 deletions
Large diffs are not rendered by default.

internal/sqltest/pgx.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111

1212
"github.com/sqlc-dev/sqlc/internal/sql/sqlpath"
1313

14-
"github.com/jackc/pgx/v4"
14+
"github.com/jackc/pgx/v5"
1515
)
1616

1717
func init() {

internal/tools/sqlc-pg-gen/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"strings"
1414
"text/template"
1515

16-
"github.com/jackc/pgx/v4"
16+
"github.com/jackc/pgx/v5"
1717
)
1818

1919
// https://dba.stackexchange.com/questions/255412/how-to-select-functions-that-belong-in-a-given-extension-in-postgresql

internal/tools/sqlc-pg-gen/proc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"context"
55
"strings"
66

7-
pgx "github.com/jackc/pgx/v4"
7+
pgx "github.com/jackc/pgx/v5"
88
)
99

1010
// https://stackoverflow.com/questions/25308765/postgresql-how-can-i-inspect-which-arguments-to-a-procedure-have-a-default-valu

internal/tools/sqlc-pg-gen/relation.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package main
33
import (
44
"context"
55

6-
pgx "github.com/jackc/pgx/v4"
6+
pgx "github.com/jackc/pgx/v5"
77
)
88

99
// Relations are the relations available in pg_tables and pg_views

protos/plugin/codegen.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ message Query {
111111
repeated string comments = 6 [json_name = "comments"];
112112
string filename = 7 [json_name = "filename"];
113113
Identifier insert_into_table = 8 [json_name = "insert_into_table"];
114+
bool is_replace = 9 [json_name = "is_replace"];
115+
bool ignore_err = 10 [json_name = "ignore_err"];
114116
}
115117

116118
message Parameter {

0 commit comments

Comments
 (0)