Re: Avoid resource leak (src/bin/pg_dump/pg_dumpall.c) - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Avoid resource leak (src/bin/pg_dump/pg_dumpall.c)
Date
Msg-id aa-KhBhDyUlrmW22@paquier.xyz
Whole thread Raw
In response to Re: Avoid resource leak (src/bin/pg_dump/pg_dumpall.c)  (Álvaro Herrera <alvherre@kurilemu.de>)
List pgsql-hackers
On Mon, Mar 09, 2026 at 01:40:51PM +0100, Alvaro Herrera wrote:
> True, but at the same time it looks as if this routine is wastefully
> written -- I mean, why spend time with a stringinfo here at all?  We
> could write this in much simpler form, as in the attached, which is even
> three lines shorter.  In fact, before 763aaa06f034, this is exactly how
> this routine was written, and I don't see why it was changed this way.

Yeah, what you are doing here looks like the sensible thing to do.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Remove redundant cast in gindesc.c
Next
From: Xuneng Zhou
Date:
Subject: Re: Refactor recovery conflict signaling a little