Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d4a0cd781f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let username = var("PGUSER").ok().unwrap_or_else(whoami::username); | ||
| let username = var("PGUSER") | ||
| .ok() | ||
| .unwrap_or_else(|| whoami::username().unwrap_or_default()); |
There was a problem hiding this comment.
Avoid defaulting Postgres username to empty string
When PGUSER is unset, this fallback now calls whoami::username().unwrap_or_default(). In whoami 2.x username() is fallible, so any lookup error produces ""; the connection startup path always sends username: Some(&options.username) (see postgres/connection/establish.rs), so an empty username is sent to the server and pgpass matching for the real user is skipped. This creates a concrete connection/auth regression in environments where OS username discovery fails (for example restricted/sandboxed runtimes).
Useful? React with 👍 / 👎.
Updates
odbc-apito version24.0.0and fixes the resulting breaking change whereBufferDesc::Binaryhad itslengthfield renamed tomax_bytes.