Re: Varchar vs text

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Varchar vs text
Дата
Msg-id 497EEA6C.1020902@archonet.com
обсуждение исходный текст
Ответ на Varchar vs text  (Thom Brown <thombrown@gmail.com>)
Ответы Re: Varchar vs text
Список pgsql-general
Thom Brown wrote:
> The reason I ask is because the documentation says "If character varying is
> used without length specifier, the type accepts strings of any size. The
> latter is a PostgreSQL extension."  I wasn't sure if such an extension meant
> there was a level of over-head involved, or reduced its indexability.

No - some other DBs might have different implementations (and so
restrictions) but varchar and text are basically interchangeable. They
are different types though, so if you add custom casts you might want to
do it for both.

There is a limit on btree index size - about 2000 chars if I remember
correctly. That's because you need to fit three index values on an 8KB
page iirc (and there are overheads too).

--
  Richard Huxton
  Archonet Ltd

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

Предыдущее
От: Andreas Wenk
Дата:
Сообщение: Re: Text search with ispell
Следующее
От: Tommy Gildseth
Дата:
Сообщение: Re: Text search with ispell