model-writtenrun 4775 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Dean Rasheed investigated bug #17759 and showed that MERGE could leave generated columns uncomputed when an UPDATE action initialized incomplete expression information before a later INSERT action #1.
- Dean proposed initializing all stored generated expressions at MERGE startup, declining an optimization for MERGE without INSERT actions because he considered its effort and risk unjustified #1.
- The attached patch added CMD_MERGE to the initialization condition and regression coverage exercising both UPDATE and INSERT actions, with the fix intended for development and PostgreSQL 15 #1.
- Tom Lane reviewed the patch and said it looked good, leaving the thread with an approved fix and no requested revisions #2.
- Dean subsequently committed the patch unchanged as fe9e658f4d, crediting Tom's review and backpatching the fix to PostgreSQL 15.