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: (view raw, whole thread or download thread mbox)
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
To say you got a vote of confidence would be to say you needed a vote of
		-- Andrew Young

In response to


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-2017 The PostgreSQL Global Development Group