Add repalloc0 and repalloc0_array These zero out the space added by repalloc. This is a common pattern that is quite hairy to code by hand.
Reviewed-by: Tom Lane <[email protected]> Discussion: https://www.postgresql.org/message-id/[email protected] Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/b4b7ce8061d34cea2b4915c41403b2a74d5fde0e Modified Files -------------- src/backend/executor/nodeHash.c | 8 ++------ src/backend/libpq/be-fsstubs.c | 9 +++------ src/backend/optimizer/util/placeholder.c | 13 ++++--------- src/backend/optimizer/util/relnode.c | 29 ++++++++--------------------- src/backend/parser/parse_param.c | 10 +++------- src/backend/storage/lmgr/lwlock.c | 9 ++------- src/backend/utils/adt/ruleutils.c | 9 ++------- src/backend/utils/cache/typcache.c | 10 ++-------- src/backend/utils/mmgr/mcxt.c | 20 ++++++++++++++++++++ src/include/utils/palloc.h | 2 ++ 10 files changed, 48 insertions(+), 71 deletions(-)
