Replace static bufs with a StringInfo in cash_words()
Heikki Linnakangas <heikki.linnakangas@iki.fi>
Replace static bufs with a StringInfo in cash_words() For clarity. The code was correct, and the buffer was large enough, but string manipulation with no bounds checking is scary. This incurs an extra palloc+pfree to every call, but in quick performance testing, it doesn't seem to be significant. Reviewed-by: Robert Haas Discussion: https://www.postgresql.org/message-id/7f86e06a-98c5-4ce3-8ec9-3885c8de0358@iki.fi
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/adt/cash.c | modified | +44 −41 |
Discussion
- Minor refactorings to eliminate some static buffers 8 messages · 2024-07-30 → 2024-08-06