mirror of https://github.com/jackc/pgx.git
Stop fallback in case of invalid password
parent
70be4b4a02
commit
b6027e37f4
|
@ -152,6 +152,10 @@ func ConnectConfig(ctx context.Context, config *Config) (pgConn *PgConn, err err
|
|||
break
|
||||
} else if pgerr, ok := err.(*PgError); ok {
|
||||
err = &connectError{config: config, msg: "server error", err: pgerr}
|
||||
ERRCODE_INVALID_PASSWORD := "28P01"
|
||||
if pgerr.Code == ERRCODE_INVALID_PASSWORD {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue