Re: [PATCH] Add function to_oct

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: [PATCH] Add function to_oct
Дата
Msg-id 20230817152628.GA3148583@nathanxps13
обсуждение исходный текст
Ответ на Re: [PATCH] Add function to_oct  (John Naylor <john.naylor@enterprisedb.com>)
Ответы Re: [PATCH] Add function to_oct  (John Naylor <john.naylor@enterprisedb.com>)
Re: [PATCH] Add function to_oct  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Список 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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: PG 16 draft release notes ready
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: Logging of matching pg_hba.conf entry during auth skips trust auth, potential security issue