From: | Tatsuo Ishii <ishii(at)postgresql(dot)org> |
---|---|
To: | michael(at)paquier(dot)xyz |
Cc: | dgrowleyml(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Proposal: add new API to stringinfo |
Date: | 2024-12-28 05:45:46 |
Message-ID: | 20241228.144546.1268408366536873193.ishii@postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Michael said:
> 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.
Ok.
David said:
> I didn't review the patch in detail, but I think "initsize" would be a
> better parameter name than "size".
Ok, will change to "initsize".
With opinions from Michael and David , what about following additional APIs?
#define STRINGINFO_DEFAULT_SIZE 1024 /* default initial allocation size */
#define STRINGINFO_SMALL_SIZE 64 /* small initial allocation size */
#define makeStringInfo makeStringInfoExtended(STRINGINFO_DEFAULT_SIZE)
#define initStringInfo(str) initStringInfoExtended(str, STRINGINFO_DEFAULT_SIZE)
extern StringInfo makeStringInfoExtended(int initsize);
extern void initStringInfoExtended(StringInfo str, int initsize);
Best reagards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
From | Date | Subject | |
---|---|---|---|
Next Message | Junwang Zhao | 2024-12-28 07:25:46 | Re: Should fix a comment referring to stats collector? |
Previous Message | Andrei Lepikhov | 2024-12-28 04:24:17 | Re: Expand applicability of aggregate's sortop optimization |