Re: Improve a few appendStringInfo calls new to v18

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: 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 13:45:18
Message-ID: 832477.1744379118@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter(at)eisentraut(dot)org> writes:
> Would it be useful to augment appendStringInfo() something like this:

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

That would change the behavior in edge cases, for instance
appendStringInfo(str, "foo%%bar"). Maybe we'd never hit those,
but on the whole I'm not in love with the idea.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2025-04-11 13:47:59 Re: Regression test fails when 1) old PG is installed and 2) meson/ninja build is used
Previous Message Fujii Masao 2025-04-11 13:39:15 Re: Correct documentation for protocol version