Re: char o varchar

Поиск
Список
Период
Сортировка
Искать
От
Alvaro Herrera
Тема
Re: char o varchar
Дата
Msg-id
20030917150857.GF2636@dcc.uchile.cl
Ответ на
Re: char o varchar (Andreas Fromm)
Список
Дерево обсуждения
char o varchar "Edwin Quijada" <listas_quijada@hotmail.com>
Re: char o varchar "scott.marlowe" <scott.marlowe@ihs.com>
On Wed, Sep 17, 2003 at 09:11:54AM +0200, Andreas Fromm wrote:
> As of my knowlege, varchar as the choice when you have varying lenght 
> strings, because only the real string lenght is stored in the db, while 
> char is usefull when most of your records ar exactly the stringlenght 
> defined by the column, because no overhead is to be kept for storing the 
> actual stringlenght.

No, the overhead is present for char(n) as well, because it stores the
length in _bytes_ while the "n" is the length in characters; they could
be different.

-- 
Alvaro Herrera ()
One man's impedance mismatch is another man's layer of abstraction.
(Lincoln Yeoh)
В списке pgsql-general по дате отправления
От: Network Administrator
Дата:
От: Tom Lane
Дата:
Сообщение: Re: State of Beta 2
FAQ