Use appendBinaryStringInfo in more places where the length is known
authorDavid Rowley <drowley@postgresql.org>
Mon, 22 Jul 2019 12:14:11 +0000 (00:14 +1200)
committerDavid Rowley <drowley@postgresql.org>
Mon, 22 Jul 2019 12:14:11 +0000 (00:14 +1200)
commit1e6a759838f7c104f3cd1fe6981a98780da4131b
tree47047d8991d0918b531fe71f38b637dc086c9ffa
parent19781729f789f3c6b2540e02b96f8aa500460322
Use appendBinaryStringInfo in more places where the length is known

When we already know the length that we're going to append, then it
makes sense to use appendBinaryStringInfo instead of
appendStringInfoString so that the append can be performed with a simple
memcpy() using a known length rather than having to first perform a
strlen() call to obtain the length.

Discussion: https://postgr.es/m/CAKJS1f8+FRAM1s5+mAa3isajeEoAaicJ=4e0WzrH3tAusbbiMQ@mail.gmail.com
contrib/postgres_fdw/deparse.c
src/backend/executor/execMain.c
src/backend/executor/execPartition.c
src/backend/storage/lmgr/deadlock.c
src/backend/utils/adt/ri_triggers.c
src/backend/utils/adt/ruleutils.c
src/backend/utils/adt/xml.c