underlying structure: varchar vs. text - Mailing list pgsql-general

From pnews@modulo.org
Subject underlying structure: varchar vs. text
Date
Msg-id 9cnf64$7fd$1@news.netmar.com
Whole thread Raw
List pgsql-general
I'm trying to store anywhere from a few words to a half page of text as a
field in my table. A fellow db programmer told me that better than using a
varchar is to break the message up into n pieces of size m (let's say m=100),


and make n (or n+1) varchar(m)s, and relate them together.

He is worried that varchars allocate and hold space.
I'm not sure if that is actually more efficient, nor do I know the limit
of how big you can make a varchar.

Additionally, at what size is it practical to use a text type?

I'm running postgreql 7.0.3

Thank you,
b





 -----  Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web  -----
  http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
   NewsOne.Net prohibits users from posting spam.  If this or other posts
made through NewsOne.Net violate posting guidelines, email abuse@newsone.net

pgsql-general by date:

Previous
From: Nils Zonneveld
Date:
Subject: Re: Joining more than 2 tables
Next
From: Martín Marqués
Date:
Subject: delete with cascade