underlying structure: varchar vs. text

From: pnews(at)modulo(dot)org
To: pgsql-general(at)postgresql(dot)org
Subject: underlying structure: varchar vs. text
Date: 2001-05-01 23:00:20
Message-ID: 9cnf64$7fd$1@news.netmar.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)newsone(dot)net

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas F. O'Connell 2001-05-01 23:05:41 do views cache functions? (was Re: do functions cache views?)
Previous Message Thomas F. O'Connell 2001-05-01 22:59:34 Re: do functions cache views?