Add destroyStringInfo function for cleaning up StringInfos
Daniel Gustafsson <dgustafsson@postgresql.org>
Add destroyStringInfo function for cleaning up StringInfos destroyStringInfo() is a counterpart to makeStringInfo(), freeing a palloc'd StringInfo and its data. This is a convenience function to align the StringInfo API with the PQExpBuffer API. Originally added in the OAuth patchset, it was extracted and committed separately in order to aid upcoming JSON work. Author: Daniel Gustafsson <daniel@yesql.se> Author: Jacob Champion <jacob.champion@enterprisedb.com> Reviewed-by: Michael Paquier <michael@paquier.xyz> Discussion: https://postgr.es/m/CAOYmi+mWdTd6ujtyF7MsvXvk7ToLRVG_tYAcaGbQLvf=N4KrQw@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/backup/basebackup.c | modified | +1 −2 |
| src/backend/commands/subscriptioncmds.c | modified | +1 −2 |
| src/backend/utils/adt/jsonb.c | modified | +1 −2 |
| src/backend/utils/adt/xml.c | modified | +2 −4 |
| src/bin/pg_combinebackup/pg_combinebackup.c | modified | +1 −4 |
| src/common/stringinfo.c | modified | +16 −0 |
| src/include/lib/stringinfo.h | modified | +8 −1 |
| src/test/regress/pg_regress.c | modified | +1 −2 |
Discussion
- Support json_errdetail in FRONTEND builds 22 messages · 2024-03-12 → 2024-03-19