Instead of dynamically allocating a StringInfo instance and then throwing it away or destroying it at the end of the function, use a stack-allocated StringInfoData.

Edit
ID 6200
Title Instead of dynamically allocating a StringInfo instance and then throwing it away or destroying it at the end of the function, use a stack-allocated StringInfoData.
CI (CFBot) Summary
Stats (from CFBot) Patch count: 1, First patch: +320−132, All patches: +320−132
Topic Refactoring
Tags Refactoring Only
Created 2025-11-03 07:36:26
Last modified 2025-11-03 13:05:50 (2 hours ago)
Latest email 2025-11-03 10:27:38 (5 hours ago)
Status
PG19-3 (2025-11-01 – 2025-11-30): Needs review
PG19-4 (2026-01-01 – 2026-01-31): Moved to different CF
Target version stable
Authors Mats Kindahl (mkindahl)
Reviewers Become reviewer
Committer Tom Lane (tgl)
Links Git
Emails
Use stack-allocated StringInfoData
First at 2025-11-03 07:27:12 by Mats Kindahl <mats.kindahl at gmail.com>
Latest at 2025-11-03 10:27:38 by David Rowley <dgrowleyml at gmail.com>
Latest attachment (0001-Use-stack-allocated-StringInfoData.v1.patch) at 2025-11-03 07:27:12 from Mats Kindahl <mats.kindahl at gmail.com>
    Attachment (0001-Use-stack-allocated-StringInfoData.v1.patch) at 2025-11-03 07:27:12 from Mats Kindahl <mats.kindahl at gmail.com> (Patch: Yes)
History
When Who What
2025-11-03 13:05:50 Ivan Kovmir (kovmir) New status: Needs review
2025-11-03 11:03:19 Ivan Kovmir (kovmir) Closed in commitfest PG19-3 with status: Committed
2025-11-03 11:03:19 Ivan Kovmir (kovmir) Changed committer to tgl
2025-11-03 11:03:19 Ivan Kovmir (kovmir) Moved from CF PG19-4 to CF PG19-3
2025-11-03 07:36:26 Mats Kindahl (mkindahl) Attached mail thread 4379aac8-26f1-42f2-a356-ff0e886228d3@gmail.com
2025-11-03 07:36:26 Mats Kindahl (mkindahl) Created patch record
Edit