Re: varchar vs char vs text - Mailing list pgsql-novice

From Brett W. McCoy
Subject Re: varchar vs char vs text
Date
Msg-id Pine.LNX.4.43.0202121559150.2365-100000@chapelperilous.net
Whole thread Raw
In response to varchar vs char vs text  (Singer Wang <swang@cs.dal.ca>)
Responses Re: varchar vs char vs text  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-novice
On Tue, 12 Feb 2002, Singer Wang wrote:

> if I have a column that's gonna be between 5-300 charactors...  should I go with a
> a charactor? varchar? or a text?
>
> what's the performance penalty going with a text instead of a varchar... or a char?
> I don't need to index it.... nor search based on it..

I'd go with text.  It's not SQL92, though.  varchar is technically
supposed to have a limit of 255, but I don't think that limit
exists in Postgres.

-- Brett
                                          http://www.chapelperilous.net/
------------------------------------------------------------------------
To say you got a vote of confidence would be to say you needed a vote of
confidence.
        -- Andrew Young


pgsql-novice by date:

Previous
From: Jason Earl
Date:
Subject: Re: varchar vs char vs text
Next
From: "Josh Berkus"
Date:
Subject: Re: "Hot Backups"