Hi, On 2019-11-01 23:19:33 +0100, Daniel Gustafsson wrote: > > On 30 Oct 2019, at 01:10, Andres Freund <and...@anarazel.de> wrote: > > > Make StringInfo available to frontend code. > > I’ve certainly wanted just that on multiple occasions, so +1 on this.
Cool. > + * StringInfo provides an extensible string data type. It can be used to > > It might be useful to point out the upper bound on the extensibility in the > rewrite of this sentence, and that it’s not guaranteed to be consistent > between > frontend and backend. Hm. Something like 'Currently the maximum length of a StringInfo is 1GB.'? I don't really think it's worth pointing out that they may not be consistent, when they currently are... And I suspect we should just fix the length limit to be higher for both, perhaps somehow allowing to limit the length for the backend cases where we want to error out if a string gets too long (possibly adding a separate initialization API that allows to specify the memory allocation flags or such). > > I'm still using stringinfo in the aforementioned thread, and I also want > > to use it in a few more places. On the more ambitious side I really > > would like to have a minimal version of elog.h available in the backend, > > and that would really be a lot easier with stringinfo available. > > s/backend/frontend/? Indeed. Thanks for looking, Andres Freund