Re: appendBinaryStringInfo stuff - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: appendBinaryStringInfo stuff
Date
Msg-id 783a4edb-84f9-6df2-7470-2ef5ccc6607a@enterprisedb.com
Whole thread Raw
In response to appendBinaryStringInfo stuff  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Responses Re: appendBinaryStringInfo stuff  (Corey Huinker <corey.huinker@gmail.com>)
List pgsql-hackers
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.

Attachment

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Exit walsender before confirming remote flush in logical replication
Next
From: Jeroen Vermeulen
Date:
Subject: Re: libpq: PQgetCopyData() and allocation overhead