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