From: | Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> |
---|---|
To: | Corey Huinker <corey(dot)huinker(at)gmail(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: appendBinaryStringInfo stuff |
Date: | 2023-02-14 12:51:02 |
Message-ID: | c804ba5d-a3d3-d808-f376-ed0cc20f37af@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 10.02.23 20:08, Corey Huinker wrote:
>
>
> On Fri, Feb 10, 2023 at 7:16 AM Peter Eisentraut
> <peter(dot)eisentraut(at)enterprisedb(dot)com
> <mailto:peter(dot)eisentraut(at)enterprisedb(dot)com>> wrote:
>
> 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.
>
>
> +1
>
> Has all the benefits that 54a177a948b0a773c25c6737d1cc3cc49222a526 had.
>
> Passes make check-world.
committed, thanks
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2023-02-14 13:32:04 | some namespace.c refactoring |
Previous Message | David Geier | 2023-02-14 12:48:56 | Re: Reduce timing overhead of EXPLAIN ANALYZE using rdtsc? |