model-writtenrun 9813 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Feike Steenbergen reported that declaring a variable named comment made COMMENT ON fail inside PL/pgSQL, with renaming the variable or using EXECUTE providing workarounds #1.
- Tom Lane demonstrated the same problem with update and proposed skipping unqualified variable lookup at statement start unless assignment or an array subscript followed, avoiding additional reserved words #2; his historical investigation found that conflicts with core SQL keywords had previously been overlooked #3.
- Tom posted a patch implementing that heuristic and testing COMMENT alongside a comment variable, reported that check-world passed, and submitted it for further scrutiny #4.
- Peter Eisentraut said the patch looked good and identified no additional syntax scenarios #5, but supplied no concrete test result, code problem, or adopted change meeting the strict suggested-review criteria.
- Tom committed #4 unchanged as 4879a5172a and confirmed completion #6; the commit deliberately avoided backpatching because the issue was rarely reported and easily worked around.