varchar vs text

From: "Sim Zacks" <sim(at)nospam(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: varchar vs text
Date: 2005-01-04 07:50:18
Message-ID: crdhut$8f3$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Are there any differences between text and varchar? I found the following in
the docs, which leads me to believe that there are no differences at all.
Can someone please confirm this before I switch all my varchars to text?

Tip: There are no performance differences between these three types, apart
from the increased storage size when using the blank-padded type. While
character(n) has performance advantages in some other database systems, it
has no such advantages in PostgreSQL. In most situations text or character
varying should be used instead.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Teran 2005-01-04 08:47:30 changing column from int4 to int8, what happens with indexes?
Previous Message Tom Lane 2005-01-04 05:32:22 Re: hundreds of millions row dBs