Re: Varchar vs text

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Varchar vs text
Дата
Msg-id 14484.1233068948@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Varchar vs text  (Thom Brown <thombrown@gmail.com>)
Ответы Re: Varchar vs text
Список pgsql-general
Thom Brown <thombrown@gmail.com> writes:
> 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.

"Extension" means "it's not in the SQL standard".  It's not meant to imply
anything about performance.

There is some potential overhead from using varchar instead of text
because of the extra dummy cast nodes that are likely to be present in
your query expressions (since all the native functions are declared to
take/return text, not varchar).  In most cases I'd think you'd be
hard-put to measure any difference though.

            regards, tom lane

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

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