pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Daniel Gustafsson <dgustafsson@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add destroyStringInfo function for cleaning up StringInfos
Date: Sat, 16 Mar 2024 22:22:48 +0000
Message-ID: <E1rlcQS-004ApL-IN@gemulon.postgresql.org> (raw)

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(-)



view thread (2+ messages)

Message-ID: <E1rlcQS-004ApL-IN@gemulon.postgresql.org>
Permalink:  ../E1rlcQS-004ApL-IN@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rlcQS-004ApL-IN@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: dgustafsson@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Add destroyStringInfo function for cleaning up StringInfos
  In-Reply-To: <E1rlcQS-004ApL-IN@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox