model-writtenrun 2256 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Daniele Varrazzo reported that PQport could return NULL for a valid connection with an empty port setting and proposed returning the compiled default port, while questioning how failed connections should behave #1.
- After raising concerns about environment and service settings #2, Daniele interpreted the documented empty-port behavior as permitting an empty-string result and submitted a revision that preserved that result while preventing NULL #3.
- Laurenz Albe reproduced a psql 18beta1 crash in \conninfo, verified that the revised patch applied, built, and passed regression tests, and recommended backpatching; he also suggested dropping the redundant empty-string check and judged a new TAP test disproportionate #4.
- Tom Lane traced the regression to the introduction of connhost[] and proposed using the original default-port behavior in v18/master, where libpq knows the correct compiled default, while preserving the revised empty-string behavior in older branches #5; Laurenz endorsed that choice #6.
- The canonical commit bfa9b25c94 landed the original patch #1 with a corrected internal port-field comment; Tom confirmed that older branches received the revision, retained the redundant check for consistency, and rejected special empty-string handling for failed connections #7.
- The thread ended with the fix committed and backpatched, followed by Laurenz's thanks and no outstanding work identified #7 #8.