Re: Char datatype

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Char datatype
Дата
Msg-id 200010120302.XAA02812@candle.pha.pa.us
обсуждение исходный текст
Ответ на Char datatype  (Andre Restivo <arestivo@criticalsoftware.com>)
Список pgsql-admin
[ Charset ISO-8859-15 unsupported, converting... ]
> Hi,
>
> Does anyone know why does pg use 4+n bytes to store a char(n) field? The
> four initial bytes seem to have only null chars so why are they used?

The 4 bytes is for the length of the string to be stored.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

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

Предыдущее
От: Lamar Owen
Дата:
Сообщение: Re: PostgreSQL encoding question
Следующее
От: Loïc TREGOUËT
Дата:
Сообщение: ERROR: ORDER BY is not allowed in INSERT/SELECT