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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-novice by date

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