Use appendBinaryStringInfo in more places where the length is known
David Rowley <drowley@postgresql.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| contrib/postgres_fdw/deparse.c | modified | +2 −2 |
| src/backend/executor/execMain.c | modified | +2 −2 |
| src/backend/executor/execPartition.c | modified | +1 −1 |
| src/backend/storage/lmgr/deadlock.c | modified | +1 −1 |
| src/backend/utils/adt/ri_triggers.c | modified | +2 −2 |
| src/backend/utils/adt/ruleutils.c | modified | +5 −5 |
| src/backend/utils/adt/xml.c | modified | +7 −5 |
Discussion
- Cleaning up and speeding up string functions 11 messages · 2019-05-25 → 2019-07-22