Re: Disadvantages to using "text"

Поиск
Список
Период
Сортировка
От Richard Broersma
Тема Re: Disadvantages to using "text"
Дата
Msg-id 396486430805070903w66a41485h3de0e502c6f318de@mail.gmail.com
обсуждение исходный текст
Ответ на Disadvantages to using "text"  ("Don Mies (NIM)" <dmies@networksinmotion.com>)
Список pgsql-novice
On Wed, May 7, 2008 at 8:52 AM, Don Mies (NIM)
<dmies@networksinmotion.com> wrote:
> Are there any reasons for not using the "text" type whenever a variable
> length string field is needed?  Are there penalties in disk usage, memory
> usage or performance?

Some client programs don't know how to deal with this and the
unconstrained VARCHAR datatype.  Especially where they are used as
primary/foreign key or as collumns used in grouping aggregates.  For
example MS-Access and Crystal reports maps the text data type as a
memo field which has limitations.


> What are the differences between declaring something "varchar" or
> "varchar(n)" or "text"?  (I realize that the middle one has an upper limit
> while the others do not.)

Practically, VARCHAR = TEXT.  Client programs like VARCHAR(N) as long
as it can map its constained text datatype to it.


--
Regards,
Richard Broersma Jr.

Visit the Los Angles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

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

Предыдущее
От: "Rodrigo E. De León Plicet"
Дата:
Сообщение: Re: Disadvantages to using "text"
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Disadvantages to using "text"