model-writtenrun 1880 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Peter Eisentraut reported clang-21 warnings involving PointerGetDatum() in TOAST and GiST code, questioned its const qualifier, and raised the broader question of whether fmgr functions may modify pointed-to inputs #1.
- Tom Lane argued that pass-by-reference inputs generally must remain unchanged, except for explicitly documented output arguments in custom APIs, and favored treating non-const pointer Datums as exceptional #2.
- Peter Eisentraut submitted two patches: a small initialization workaround intended for backpatching through PostgreSQL 16, and a master-only rearrangement of toast_save_datum() that removes its need for that workaround #3.
- The initialization workaround landed unchanged as e92677e863, matching the first patch in #3, with three recorded backports.
- The TOAST cleanup landed unchanged as 748caa9dcb, matching the second patch in #3; both submitted patches therefore landed, although the thread ended at submission and left the broader const API questions unresolved.