Coccinelle for PostgreSQL development [5/N]: using palloc_array() and friends

Started by Mats Kindahlalmost 2 years ago1 messageshackers

Thread notes

1 note#refactor
hackorum-bot#refactor
hackorum-bot
1 day ago

@global #refactor

#refactor
Jump to latest
#1Mats Kindahl
mats@timescale.com

This is an example of a large-scale refactoring to improve the code.

For PostgreSQL 16, Peter extended the palloc()/pg_malloc() interface in
commit 2016055a92f to provide more type-safety, but these functions are not
widely used. This semantic patch captures and replaces all uses of palloc()
where palloc_array() or palloc_object() could be used instead.
--
Best wishes,
Mats Kindahl, Timescale

Attachments:

0005-Add-script-for-palloc_array.v1.patchtext/x-patch; charset=US-ASCII; name=0005-Add-script-for-palloc_array.v1.patchDownload+2566-2322