Thread
-
Re: Refactor StringInfo usage in subscriptioncmds.c
Mats Kindahl <mats.kindahl@gmail.com> — 2025-11-06T12:47:35Z
On 11/6/25 13:40, Álvaro Herrera wrote: > On 2025-Nov-06, Mats Kindahl wrote: > >> Attached is a proposal that instead of building error message and hints >> dynamically, it will use ereport() directly and as a result does not have to >> allocate the error message strings and error message hints dynamically and >> these can be removed. > LGTM, thanks. > > I agree with Amit that there doesn't seem to be a need to free > pubnames.data. We're already leaking publist, for instance. This is > okay since we only call these functions during DDL, which in general is > not sensitive to leaks. Seems reasonable. Here is an updated version that removes the pfree() calls. Best wishes, Mats Kindahl