Thread: pgsql: Add destroyStringInfo function for cleaning up StringInfos
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 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/b7831865159d5fb6f0d263e6023f0986589fe254 Modified Files -------------- src/backend/backup/basebackup.c | 3 +-- src/backend/commands/subscriptioncmds.c | 3 +-- src/backend/utils/adt/jsonb.c | 3 +-- src/backend/utils/adt/xml.c | 6 ++---- src/bin/pg_combinebackup/pg_combinebackup.c | 5 +---- src/common/stringinfo.c | 16 ++++++++++++++++ src/include/lib/stringinfo.h | 9 ++++++++- src/test/regress/pg_regress.c | 3 +-- 8 files changed, 31 insertions(+), 17 deletions(-)