Single Byte values

Поиск
Список
Период
Сортировка
От Jason Hihn
Тема Single Byte values
Дата
Msg-id NGBBLHANMLKMHPDGJGAPEEHKCGAA.jhihn@paytimepayroll.com
обсуждение исходный текст
Ответы Re: Single Byte values  ("Nigel J. Andrews" <nandrews@investsystems.co.uk>)
Re: Single Byte values  (Manfred Koizar <mkoi-pg@aon.at>)
Список pgsql-general
As someone pointed out, CHAR(1) costs 5 bytes. Is there a better way to
store it? I can see one or three bytes as being bad (byte-alignment issues
and speed) Two could be ok, but at the very least 4 should be the max for
char(1).

Two is ok, once you consider multi-bytes strings (unicode)
Three is right out -
Four bytes could store two multibyte, two single byte (cast as 2 byte for
unicode) or four single byte characters.

But in returning to my question, what should I be using for char(1) to
char(4) storage?

Thanks again!


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: unable to dump database, toast errors
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: updating table field whenever other table field changes