Andres Freund <andres@anarazel.de> writes:
> On 2022-07-19 21:08:53 +0800, Japin Li wrote:
>> + {
>> + termPQExpBuffer(&buf);
>> return false;
>> + }
> Adding copy over copy of this same block doesn't seem great. Can we instead
> add a helper for it or such?
The usual style in these files is something like
if (bad things happened)
goto fail;
...
fail:
termPQExpBuffer(&buf);
return false;
Yeah, it's old school, but please let's not have a few functions that
do it randomly differently from all their neighbors.
regards, tom lane