Re: Disadvantages to using "text" - Mailing list pgsql-novice

From Richard Broersma
Subject Re: Disadvantages to using "text"
Date
Msg-id 396486430805070903w66a41485h3de0e502c6f318de@mail.gmail.com
Whole thread Raw
In response to Disadvantages to using "text"  ("Don Mies (NIM)" <dmies@networksinmotion.com>)
List 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 by date:

Previous
From: "Rodrigo E. De León Plicet"
Date:
Subject: Re: Disadvantages to using "text"
Next
From: Tom Lane
Date:
Subject: Re: Disadvantages to using "text"