model-writtenrun 4050 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexander Lakhin reported that a PL/Python iterator encountering an SPI error could fail an assertion because error handling incorrectly assumed no underlying detail string existed, reproducing the problem from PostgreSQL 11 through master in #1.
- Alexander proposed removing the assertion and preserving the underlying detail in #2; Michael Paquier requested a regression test in #3, while Tom Lane demonstrated that this priority could discard more useful exception information and suggested reconsidering message selection in #4.
- Alexander instead proposed concatenating the exception message and detail, with a to_date regression test, in #5; Michael suggested simpler buffer management but opposed backpatching changed error output in #6, and Tom agreed with that compatibility concern in #7.
- Michael supplied an assertion-only backpatch proposal retaining the regression test in #8; Tom requested distinct date-input and format strings to make the expected error unambiguous in #9, and Alexander accepted the proposed changes in #11.
- Alexander supplied backpatch materials and a revised main patch in #13, continuing the concatenation proposal with simpler buffer handling and the clearer test input.
- Michael committed the minimal proposal from #8 with the test input changed to 'xy' as af5b3c3d1e, fixing the assertion while deferring richer error details because changing error output could affect applications.
- Michael confirmed application and backpatching in #15; he noted an older Python-version discrepancy in alternate expected outputs but declined further investigation, leaving the assertion fix landed and the broader error-detail enhancement deferred.