Skip site navigation (1) Skip section navigation (2)

Re: varchar vs char vs text

From: "Brett W(dot) McCoy" <bmccoy(at)chapelperilous(dot)net>
To: Singer Wang <swang(at)cs(dot)dal(dot)ca>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: varchar vs char vs text
Date: 2002-02-12 21:01:34
Message-ID: Pine.LNX.4.43.0202121559150.2365-100000@chapelperilous.net (view raw or flat)
Thread:
Lists: 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


In response to

Responses

pgsql-novice by date

Next:From: Josh BerkusDate: 2002-02-12 21:43:10
Subject: Re: "Hot Backups"
Previous:From: Jason EarlDate: 2002-02-12 20:41:03
Subject: Re: varchar vs char vs text

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group