Re: char o varchar

Поиск
Список
Период
Сортировка
От scott.marlowe
Тема Re: char o varchar
Дата
Msg-id Pine.LNX.4.33.0309161434100.5612-100000@css120.ihs.com
обсуждение исходный текст
Ответ на char o varchar  ("Edwin Quijada" <listas_quijada@hotmail.com>)
Список pgsql-general
On Tue, 16 Sep 2003, Edwin Quijada wrote:

>
>
>
>
> Hoii!!
>
> I am creating my struct and I have the question :
> What I must use for character fields char or varchar?
> Which are the differences? and the better

Generally speaking, varchar or text() types are preferred.  char() types
are padded.  I.e. if you create a table with char(8) and insert 'abc' then
select it, you'll get 'abc     ' back, i.e. abc followed by padding spaces
to make it 8 wide.

Most of the time this is not what the user wants.


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

Предыдущее
От: Network Administrator
Дата:
Сообщение: Re: State of Beta 2
Следующее
От: "scott.marlowe"
Дата:
Сообщение: Re: Idea for improving speed of pg_restore