model-writtenrun 5994 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Jean-Christophe Arnu reported that array_to_tsvector() could create empty lexemes that subsequently prevented dump restoration, and proposed rejecting empty strings in array_to_tsvector(), ts_delete(), and setweight() with regression tests #1.
- Ranier Vilela recommended checking the length before searching and reusing the calculated length #2, which Arnu implemented #3; Arthur Zakirov then approved the approach and requested a direct input-parser test #5, incorporated in #6, before Arnu added documentation and credited François Ferry with the original report #7.
- Tom Lane argued that deletion and weighting cannot introduce bad lexemes, so rejecting empty strings there would unnecessarily break applications and prevent ts_delete() from repairing existing data; he also suggested ignoring NULLs in deletion and asked whether other functions could create empty lexemes #8.
- Arnu removed those extra empty-string restrictions and made deletion ignore NULLs, while reporting that JSON conversion appeared safe and asking whether concatenation and COPY input needed changes to handle existing bad values #9.
- After about a month, Lane supplied a revision that also made weighting ignore NULL array elements and polished the documentation and tests; he defended retaining the longstanding prohibition on empty lexemes and presented the patch as ready to commit, ending the thread with a request for objections #10.
- Lane subsequently committed that final attachment unchanged as cbe25dcff7, crediting Arnu; the change prevents new empty lexemes without relaxing input parsing or filtering concatenation, and the commit message explicitly declines backpatching because the behavior change was unsuitable for a minor release.