model-writtenrun 8949 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alvaro Herrera opened the thread with a patch adding portable strndup support and frontend pg_strndup and pnstrdup wrappers, bringing a proposal from another discussion to wider attention #1.
- Tom Lane identified ECPG's existing ecpg_strndup as a candidate for replacement by the new function #2.
- Andres Freund objected to potential library symbol collisions, AC_REPLACE_FUNCS complexity, and redundant wrappers, proposing frontend pnstrdup alone; Tom Lane supported implementing it directly with the already available strnlen #3 #4.
- Alvaro accepted the simpler design and deferred renaming pnstrdup, then posted a revision adding its direct frontend implementation and converting pg_waldump, psql, scripts, and ECPG callers; he also explained that malloc already sets errno on failure #5 #6.
- Tom gave the revised patch a brief LGTM in the thread's final message, and Alvaro subsequently committed that patch unchanged apart from rebase metadata as 0b9466fce2, completing the frontend pnstrdup work #7 #6.