Re: patch: utf8_to_unicode (trivial)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: patch: utf8_to_unicode (trivial)
Дата
Msg-id 7837.1281916161@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: patch: utf8_to_unicode (trivial)  (Joseph Adams <joeyadams3.14159@gmail.com>)
Ответы Re: patch: utf8_to_unicode (trivial)  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Joseph Adams <joeyadams3.14159@gmail.com> writes:
> I've attached another patch that moves utf8_to_unicode to src/port per
> Robert Haas's suggestion.

> This patch itself is not quite as elegant as the first one because it
> puts platform-independent code that "belongs" in wchar.c into src/port
> .  It also uses unsigned int instead of pg_wchar because the typedef
> of pg_wchar isn't available to the frontend, if I'm not mistaken.

> I'm not sure whether I like the old patch better or the new one.

FWIW, I *don't* like this version, specifically because it fails to
utilize the pg_wchar datatype.  The function in question is neither big
enough nor mutable enough that it's urgent to not duplicate it between
the backend and psql, so I don't see much value in moving it to src/port.

I think the correct things to do are to apply the original patch (modulo
a stylistic change, namely put the new function where the old one was to
miminize the size of the diff), and to back-patch the bug fix in mbprint.c.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: DropRelFileNodeBuffers API change (was Re: [BUGS] BUG #5599: Vacuum fails due to index corruption issues)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: PL/pgSQL EXECUTE '..' USING with unknown