Re: Fixed length data types issue

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Fixed length data types issue
Дата
Msg-id 450A6BDF.3050503@enterprisedb.com
обсуждение исходный текст
Ответ на Re: Fixed length data types issue  (Gregory Stark <stark@enterprisedb.com>)
Ответы Re: Fixed length data types issue  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-hackers
Gregory Stark wrote:
> It's limited but I wouldn't say it's very limiting. In the cases where it
> doesn't apply there's no way out anyways. A UTF8 field will need a length
> header in some form.

Actually, you can determine the length of a UTF-8 encoded character by 
looking at the most significant bits of the first byte. So we could 
store a UTF-8 encoded CHAR(1) field without any additional length header.

See http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 for the bit patterns.

AFAIK, UTF-16 works similarly.

-- 
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com


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

Предыдущее
От: "Magnus Hagander"
Дата:
Сообщение: Re: Build v8.1.4 with VC++ 2005
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: New version of money type