model-writtenrun 1925 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Yugo Nagata proposed explicitly checking duplicate enum labels during CREATE TYPE, producing a descriptive error consistent with ALTER TYPE instead of exposing a catalog unique-index violation #1.
- Rahila Syed questioned the nested-loop cost and suggested catching the insertion error or checking earlier; Yugo defended the loop as inexpensive for typical enums, explained that catching the error would not identify the duplicated label, and favored checking where label text was already processed #2 #3.
- Jim Jones requested an “enum label” error prefix and regression coverage; Yugo incorporated both, placing the new test in enum.sql because related ALTER TYPE tests already existed there, and Jim approved the revision #4 #5 #6.
- Tom Lane committed the revised patch as 1b1960c8c9 with light cleanup, including removal of an obsolete comment, relocation of the check after label-length validation, and a clearer test type name; he reported negligible overhead at 1000 labels and judged more complex alternatives unnecessary #5 #7.
- The thread ended with the change committed and Yugo agreeing that optimization could wait unless users reported problems with unusually large enums #8.