model-writtenrun 6308 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Troy reported that the text position function's documentation should explicitly say it returns the first occurrence when a substring appears multiple times #1.
- Bruce Momjian expanded the investigation to related string functions and submitted a patch clarifying first-match behavior and changing singular/plural substring wording #2.
- Tom Lane challenged the wording changes #3; after Bruce requested clarification #4, Tom explained that one regexp_match result can contain multiple captured substrings and that the g flag controls multiple matches for other functions #5.
- Bruce revised the patch to preserve plural captures, explicitly explain the g flag, and include the originally requested text position clarification #6.
- Bruce committed the revised patch unchanged as 6feebcb6b4 and closed the thread by confirming backpatching through PostgreSQL 13, explaining that older documentation was more minimal #7.