Stop fallback in case of invalid password

query-exec-mode
Andrey Borodin 2021-03-12 11:48:43 +05:00 committed by Jack Christensen
parent 70be4b4a02
commit b6027e37f4
1 changed files with 4 additions and 0 deletions

View File

@ -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;
}
}
}