Skip to content

Commit 4b6fdfc

Browse files
Remove use of github.com/lib/pq as direct dependency
1 parent fee0426 commit 4b6fdfc

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ require (
178178
github.com/json-iterator/go v1.1.12
179179
github.com/julienschmidt/httprouter v1.3.0 // replaced
180180
github.com/keys-pub/go-libfido2 v1.5.3-0.20220306005615-8ab03fb1ec27 // replaced
181-
github.com/lib/pq v1.10.9
181+
github.com/lib/pq v1.10.9 // indirect
182182
github.com/mailgun/mailgun-go/v4 v4.23.0
183183
github.com/mark3labs/mcp-go v0.43.0
184184
github.com/mattn/go-shellwords v1.0.12

lib/srv/db/postgres/users.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import (
3232
"github.com/jackc/pgconn"
3333
"github.com/jackc/pgerrcode"
3434
"github.com/jackc/pgx/v4"
35-
"github.com/lib/pq"
3635

3736
"github.com/gravitational/teleport/api/types"
3837
apiawsutils "github.com/gravitational/teleport/api/utils/aws"
@@ -254,7 +253,7 @@ func (e *Engine) applyPermissions(ctx context.Context, sessionCtx *common.Sessio
254253
return trace.Wrap(err)
255254
})
256255
if err != nil {
257-
var pgErr *pq.Error
256+
var pgErr *pgconn.PgError
258257
if errors.As(err, &pgErr) {
259258
if pgErr.Code == common.SQLStatePermissionsChanged {
260259
logger.ErrorContext(ctx, "User permissions have changed, rejecting connection",

0 commit comments

Comments
 (0)