Re: varchar vs. text

Поиск
Список
Период
Сортировка
От Ron Johnson
Тема Re: varchar vs. text
Дата
Msg-id 1063880717.11739.1590.camel@haggis
обсуждение исходный текст
Ответ на varchar vs. text  (Michael Garriss <mgarriss@earthlink.net>)
Список pgsql-general
On Wed, 2003-09-17 at 22:59, Michael Garriss wrote:
> I curious about the benefits of a varchar over text.  Is it speed,
> size?  If so, how much speed, size?  Is a varchar(64) and a text with 64
> chars the same size?  I'm inclined to make all my varchars into text so
> I don't have to worry about inserting something to big.

An analyst would say that "correctness" is a reason for specifying
a max length.  For example, in t_names, I could stick "War and Peace"
into first_name, but, obviously, that's not "correct".

CREATE TABLE t_names (
first_name   TEXT,
last_name    TEXT );

--
-----------------------------------------------------------------
Ron Johnson, Jr. ron.l.johnson@cox.net
Jefferson, LA USA

"(Women are) like compilers. They take simple statements and
make them into big productions."
Pitr Dubovitch


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

Предыдущее
От: Ron Johnson
Дата:
Сообщение: Re: Why does adding SUM and GROUP BY destroy performance?
Следующее
От: ramkumarm@npd.hcltech.com (Ramkumar)
Дата:
Сообщение: Problem in Function returning Cursors - Postgres Sql 7.2