Re: Refactor to introduce pg_strcoll().

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Refactor to introduce pg_strcoll().
Дата
Msg-id 0a65336c-a3e6-20a5-55fe-b7b50dd73fa4@enterprisedb.com
обсуждение исходный текст
Ответ на Refactor to introduce pg_strcoll().  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: Refactor to introduce pg_strcoll().  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
On 07.10.22 01:15, Jeff Davis wrote:
> + * Call ucol_strcollUTF8(), ucol_strcoll(), strcoll(), strcoll_l(), wcscoll(),
> + * or wcscoll_l() as appropriate for the given locale, platform, and database
> + * encoding. Arguments must be NUL-terminated. If the locale is not specified,
> + * use the database collation.
> + *
> + * If the collation is deterministic, break ties with memcmp(), and then with
> + * the string length.
> + */
> +int
> +pg_strcoll(const char *arg1, int len1, const char *arg2, int len2,
> +           pg_locale_t locale)

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.

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




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

Предыдущее
От: Dmitry Koval
Дата:
Сообщение: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Следующее
От: "shiy.fnst@fujitsu.com"
Дата:
Сообщение: RE: [RFC] building postgres with meson - v13