Re: Refactor to introduce pg_strcoll().

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: Refactor to introduce pg_strcoll().
Дата
Msg-id 81bebda79b605cea82ce5144a8ff51f29af4611c.camel@j-davis.com
обсуждение исходный текст
Ответ на Re: Refactor to introduce pg_strcoll().  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Ответы Re: Refactor to introduce pg_strcoll().  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Список pgsql-hackers
On Thu, 2022-10-13 at 10:57 +0200, Peter Eisentraut wrote:
> It's a bit confusing that arguments must be NUL-terminated, but the
> length is still specified.  Maybe another sentence to explain that
> would
> be helpful.

Added a comment. It was a little frustrating to get a perfectly clean
API, because the callers do some buffer manipulation and optimizations
of their own. I think this is an improvement, but suggestions welcome.

If win32 is used with UTF-8 and wcscoll, it ends up allocating some
extra stack space for the temporary buffers, whereas previously it used
the buffers on the stack of varstr_cmp(). I'm not sure if that's a
problem or not.

> The length arguments ought to be of type size_t, I think.

Changed.

Thank you.


--
Jeff Davis
PostgreSQL Contributor Team - AWS



Вложения

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

Предыдущее
От: Cary Huang
Дата:
Сообщение: Re: Avoid memory leaks during base backups
Следующее
От: Corey Huinker
Дата:
Сообщение: Re: predefined role(s) for VACUUM and ANALYZE