Clarify comment for worst-case allocation in quote_literal_cstr()
Michael Paquier <michael@paquier.xyz>
Clarify comment for worst-case allocation in quote_literal_cstr() palloc() is invoked with a specific formula for its allocation size in quote_literal_cstr(). This wastes some memory, but the size is large enough to cover even the worst-case scenarios. No explanations were given about the reasons behind these numbers. This commit adds more documentation about all that. Author: Steve Chavez <steve@supabase.io> Discussion: https://postgr.es/m/CAGRrpzZ9bToRWS+fAnjxDJrxwZN1QcJ-y1Pn2yg=Hst6rydLtw@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/adt/quote.c | modified | +6 −1 |
Discussion
- [PATCH] clarify palloc comment on quote_literal_cstr 9 messages · 2025-04-06 → 2025-04-08