pgsql: Use StringInfo to build the result in oidvectortypes()
pgsql: Use StringInfo to build the result in oidvectortypes()
От:
Heikki Linnakangas <heikki.linnakangas@iki.fi>
Дата:
Use StringInfo to build the result in oidvectortypes() Replace manual buffer management with StringInfo to avoid repeatedly scanning the accumulated output when appending type names. This removes quadratic scanning for large input vectors and simplifies the code. Also check for interrupts in the loop and free temporary type names after appending them to the result. Author: Chao Li Reviewed-by: Japin Li Reviewed-by: David Rowley Discussion: https://www.postgresql.org/message-id/70611808-81DA-4B99-A3DB-7371F7EA4702@gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/a999971331301a4a2f945220733b11af90cc2962 Modified Files -------------- src/backend/utils/adt/format_type.c | 36 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 23 deletions(-)