On 19.12.22 07:13, Peter Eisentraut wrote:
> Also, the argument type of appendBinaryStringInfo() is char *. There is
> some code that uses this function to assemble some kind of packed binary
> layout, which requires a bunch of casts because of this. I think
> functions taking binary data plus length should take void * instead,
> like memcpy() for example.
I found a little follow-up for this one: Make the same change to
pq_sendbytes(), which is a thin wrapper around appendBinaryStringInfo().
This would allow getting rid of further casts at call sites.