On Thu, Aug 17, 2023 at 12:35:54PM +0700, John Naylor wrote:
> That makes it a lexically-scoped global variable, which we don't need
> either. Can we have the internal function allocate on the stack, then
> call cstring_to_text() on that, returning the text result? That does its
> own palloc.
>
> Or maybe better, save the starting pointer, compute the length at the end,
> and call cstring_to_text_with_len()? (It seems we wouldn't need
> the nul-terminator then, either.)
Works for me. I did it that way in v7.
--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com