Re: text .vs. varchar - Mailing list pgsql-general

From Bill Moran
Subject Re: text .vs. varchar
Date
Msg-id 20080813084519.7ef002ab.wmoran@collaborativefusion.com
Whole thread Raw
In response to text .vs. varchar  (Joao Ferreira <jmcferreira@critical-links.com>)
Responses Re: text .vs. varchar  (Martin Gainty <mgainty@hotmail.com>)
List pgsql-general
In response to Joao Ferreira <jmcferreira@critical-links.com>:

> Hello all,
>
> I have a big database in which much information is stored in TEXT type
> columns (I did this initially because I did not want to limit the
> maximum size of the string to be stored)... but...
>
> .. let's say I choose an upper limit (p.ex. 200) for the string sizes
> and I start a fresh database with VARCHAR(200).
>
> What tradeoffs can I expect ? disk usage ? query execution times ?

See the "Tip" on this page, it answers your questions:
http://www.postgresql.org/docs/8.3/static/datatype-character.html

--
Bill Moran
Collaborative Fusion Inc.
http://people.collaborativefusion.com/~wmoran/

wmoran@collaborativefusion.com
Phone: 412-422-3463x4023

pgsql-general by date:

Previous
From: Bill Moran
Date:
Subject: Re: Postgres eats all memory
Next
From: Martin Gainty
Date:
Subject: Re: text .vs. varchar