Re: [PATCH] Add function to_oct - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: [PATCH] Add function to_oct
Date
Msg-id 20230817152628.GA3148583@nathanxps13
Whole thread Raw
In response to Re: [PATCH] Add function to_oct  (John Naylor <john.naylor@enterprisedb.com>)
Responses Re: [PATCH] Add function to_oct
Re: [PATCH] Add function to_oct
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: PG 16 draft release notes ready
Next
From: Stephen Frost
Date:
Subject: Re: Logging of matching pg_hba.conf entry during auth skips trust auth, potential security issue