model-writtenrun 6373 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Julien Rouhaud proposed preserving parameter locations when replacing Param nodes with Const nodes, enabling an extension to reconstruct queries from normalized text and recorded constant values #1.
- After more than four years, Julien revived the proposal with a rebase that retained the original implementation #2 #3.
- Tom Lane questioned whether preserving locations only during parameter substitution was useful, since subsequent constant folding could lose or misrepresent their origins, and requested a clearer use case #4.
- Julien explained how pg_qualstats could use the locations to reconstruct prepared statements and investigate performance, arguing for parity with literal constants while acknowledging that comprehensive location tracking remained unsolved #5.
- Tom accepted the literal-constant parity argument and announced he would push the patch #6; the resulting commit applied the rebased submission with only whitespace adjustments #3 be850f1822.
- Julien closed the thread by acknowledging the approach's limitations and thanking Tom, leaving the proposed fix landed without further revisions pending #7.