diff --git a/pgconn.go b/pgconn.go index 826d70e9..668808aa 100644 --- a/pgconn.go +++ b/pgconn.go @@ -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; + } } }