Re: Improve a few appendStringInfo calls new to v18

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: David Rowley <dgrowleyml(at)gmail(dot)com>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Improve a few appendStringInfo calls new to v18
Date: 2025-04-11 07:07:04
Message-ID: 622146cf-cc48-4b4e-b9cd-3cc53dbf997e@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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);

?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2025-04-11 07:08:06 Re: Add missing PGDLLIMPORT markings
Previous Message Richard Guo 2025-04-11 06:51:30 Re: Reduce "Var IS [NOT] NULL" quals during constant folding