model-writtenrun 7616 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Ian Lawrence Barwick reported that has_column_privilege() returned TRUE for dropped or nonexistent attribute numbers when table privileges existed, and proposed a caller-supplied column_checked flag plus regression tests and a separate static-prototype cleanup in #1.
- Peter Eisentraut questioned whether the behavior needed fixing and whether the prototype additions were necessary in #2; Ian defended consistent NULL results for invalid attribute numbers and described the prototype cleanup as optional in #3.
- Joe Conway took over implementation, explaining in #7 that reordering existence checks avoided changing every caller; his replacement patch in #9 retained Ian's regression changes but omitted the prototype cleanup.
- Chengxi Sun reported successful testing and installcheck-world results in #10, but Joe asked which submitted version had been tested in #11, leaving that attribution unresolved.
- Tom Lane found that an intervening catalog lookup could invalidate the cached attribute row, undermining the reordered checks, and proposed ACL entry points that tolerate missing objects in #13; Joe implemented extended attribute and relation ACL APIs with an is_missing argument in #14.
- Tom reviewed the new APIs, requested documentation comments, advised against expanding the work to unaffected ACL functions, and favored no backpatch in #15; Joe then noticed that his rewrite had accidentally restored the original bug and posted column-first checking with corrected tests in #16.
- Tom reviewed the corrected patch and requested a comment explaining why column privileges must be checked first in #17; Joe agreed to add that explanation and documentation for all four new entry points in #18.
- Joe committed #16 with those comment additions as b12bd4869b and confirmed the push in #19, completing the fix without backpatching because it changed visible behavior and required invasive changes; the optional prototype cleanup was not included.