| From: | Michael Paquier <michael(at)paquier(dot)xyz> |
|---|---|
| To: | Tatsuo Ishii <ishii(at)postgresql(dot)org> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Proposal: add new API to stringinfo |
| Date: | 2024-12-26 03:37:12 |
| Message-ID: | Z2zPaNm-DIRVxpwV@paquier.xyz |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, Dec 26, 2024 at 09:53:09AM +0900, Tatsuo Ishii wrote:
>> Saying that, having more control over the initial
>> size used for a StringInfo could provide better practices in some
>> cases. This reminds me of the ALLOCSET_SMALL_* fields in memutils.h,
>> hence an idea would be an initStringInfoExtended() that you could
>> combine with two #define two: one for the "default" of 1024 and a
>> second one for "small", like 32 or 64 (?), that can be used at will
>> with the new API call. Then you could switch initStringInfo() to
>> become a macro of the new "extended" call. Just an idea.
>
> But then the extensions that use stringinfo.c need to be recompiled?
New APIs are materials for HEAD, so recompilation needs to happen
anyway. Using a macro makes things slightly simpler and it would not
break unnecessarily the compilation of existing extensions.
--
Michael
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Umar Hayat | 2024-12-26 04:15:36 | Re: Add XMLNamespaces to XMLElement |
| Previous Message | David Rowley | 2024-12-26 03:15:42 | Re: Proposal: add new API to stringinfo |