Re: Collation version tracking for macOS

Поиск
Список
Период
Сортировка
От Dagfinn Ilmari Mannsåker
Тема Re: Collation version tracking for macOS
Дата
Msg-id 87bkoni7hg.fsf@wibble.ilmari.org
обсуждение исходный текст
Ответ на Collation version tracking for macOS  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Список pgsql-hackers
Jeff Davis <pgsql@j-davis.com> writes:

> On Mon, 2022-11-28 at 19:36 -0800, Jeff Davis wrote:
>> On Mon, 2022-11-28 at 21:57 -0500, Robert Haas wrote:
>> > That is ... astonishingly bad.
>> 
>> https://unicode-org.atlassian.net/browse/CLDR-16175
>
> Oops, reported in CLDR instead of ICU. Moved to:
>
> https://unicode-org.atlassian.net/browse/ICU-22215

Out of morbid curiosity I went source diving, and the culprit is this
bit (which will also break if a version component ever goes above 999):

    /* write the decimal field value */
    field=versionArray[part];
    if(field>=100) {
        *versionString++=(char)('0'+field/100);
        field%=100;
    }
    if(field>=10) {
        *versionString++=(char)('0'+field/10);
        field%=10;
    }
    *versionString++=(char)('0'+field);

(https://sources.debian.org/src/icu/72.1-3/source/common/putil.cpp#L2308)

because apparently snprintf() is too hard?

- ilmari



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

Предыдущее
От: Kazutaka Onishi
Дата:
Сообщение: Re: Asynchronous execution support for Custom Scan
Следующее
От: Ronan Dunklau
Дата:
Сообщение: Re: Asynchronous execution support for Custom Scan