Re: Improve a few appendStringInfo calls new to v18 - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Improve a few appendStringInfo calls new to v18
Date
Msg-id 622146cf-cc48-4b4e-b9cd-3cc53dbf997e@eisentraut.org
Whole thread Raw
In response to Improve a few appendStringInfo calls new to v18  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: Improve a few appendStringInfo calls new to v18
List pgsql-hackers
On 10.04.25 05:51, David Rowley wrote:
> Looks like v18 has grown a few appendStringInfo misusages, e.g. using
> appendStringInfo() when no formatting is needed or just using format
> "%s" instead of using appendStringInfoString().

Would it be useful to augment appendStringInfo() something like this:

if (VA_ARGS_NARGS() == 0)
     return appendStringInfoString(str, fmt);

?




pgsql-hackers by date:

Previous
From: Richard Guo
Date:
Subject: Re: Reduce "Var IS [NOT] NULL" quals during constant folding
Next
From: Peter Eisentraut
Date:
Subject: Re: Add missing PGDLLIMPORT markings