Re: Fixup some appendStringInfo and appendPQExpBuffer calls

Peter Eisentraut <peter.eisentraut@enterprisedb.com>

From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Tom Lane <tgl@sss.pgh.pa.us>, David Rowley <dgrowleyml@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>, Tomas Vondra <tomas.vondra@enterprisedb.com>, "houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-06-03T13:03:14Z
Lists: pgsql-hackers
On 03.06.21 06:17, Tom Lane wrote:
> David Rowley <dgrowleyml@gmail.com> writes:
>> There are quite a few other places in that file that should be using
>> DatumGetCString() instead of DatumGetPointer().
>> Should we fix those too for PG14?
> 
> +1.  I'm surprised we are not getting compiler warnings.

Well, DatumGetPointer() returns Pointer, and Pointer is char *.



Commits

  1. Clean up some questionable usages of DatumGet* macros

  2. Standardize usages of appendStringInfo and appendPQExpBuffer