Allow to avoid NUL-byte management for stringinfos and use in format.c.
authorAndres Freund <[email protected]>
Tue, 3 Oct 2017 07:16:15 +0000 (00:16 -0700)
committerAndres Freund <[email protected]>
Sun, 8 Oct 2017 16:41:55 +0000 (09:41 -0700)
commitd6d93cd9c39e0c5d47ab74c83b412403bf5fcb72
tree04d966f09c0950330de40424a448cd9bd7152b29
parente71ea54bf4e76578242430c0481647a507fb46d4
Allow to avoid NUL-byte management for stringinfos and use in format.c.

In a lot of the places having appendBinaryStringInfo() maintain a
trailing NUL byte wasn't actually meaningful, e.g. when appending an
integer which can contain 0 in one of its bytes.

Removing this yields some small speedup, but more importantly will be
more consistent when providing faster variants of pq_sendint etc.
src/backend/lib/stringinfo.c
src/backend/libpq/pqformat.c
src/include/lib/stringinfo.h