Replace formatting.c's fixed-size output buffers with StringInfos.

In both versions of NUM_processor(), use a StringInfo for the
output string, eliminating the need to guess an upper bound
for the output length, and removing the need to truncate some
strings of unpredictable length.

Author: Tom Lane <[email protected]>
Reviewed-by: Heikki Linnakangas <[email protected]>
Discussion: https://postgr.es/m/[email protected]

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ec352b37d88a12f0256526ff0a51bd86d587d604

Modified Files
--------------
src/backend/utils/adt/formatting.c | 310 +++++++++++++++----------------------
1 file changed, 127 insertions(+), 183 deletions(-)

Reply via email to