Add resetStringInfo(), which clears the content of a StringInfo, and
Neil Conway <neilc@samurai.com>
Add resetStringInfo(), which clears the content of a StringInfo, and fixup various places in the tree that were clearing a StringInfo by hand. Making this function a part of the API simplifies client code slightly, and avoids needlessly peeking inside the StringInfo interface.
Files
| Path | Change | +/− |
|---|---|---|
| contrib/tablefunc/tablefunc.c | modified | +11 −10 |
| src/backend/catalog/pg_shdepend.c | modified | +2 −3 |
| src/backend/commands/copy.c | modified | +7 −19 |
| src/backend/libpq/pqcomm.c | modified | +3 −9 |
| src/backend/lib/stringinfo.c | modified | +14 −2 |
| src/backend/storage/lmgr/deadlock.c | modified | +2 −3 |
| src/backend/tcop/fastpath.c | modified | +3 −9 |
| src/backend/tcop/postgres.c | modified | +2 −5 |
| src/backend/utils/adt/rowtypes.c | modified | +2 −3 |
| src/backend/utils/adt/xml.c | modified | +3 −5 |
| src/include/lib/stringinfo.h | modified | +8 −1 |