Re: varchar(n) VS text

From: Ben <bench(at)silentmedia(dot)com>
To: Pierre Thibaudeau <pierdeux(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: varchar(n) VS text
Date: 2007-06-26 04:06:34
Message-ID: Pine.LNX.4.64.0706252105010.27105@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 25 Jun 2007, Pierre Thibaudeau wrote:

> From my reading of the dataype documentation, the ONLY reason I can
> think of for using "varchar(n)" would be in order to add an extra
> data-type constraint to the column.

That's my understanding as well. I can think of a few reasons to use
char(n) over text if you know exactly how many characters you will always
have, but char isn't what you asked about.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-06-26 04:16:17 Re: varchar(n) VS text
Previous Message Pierre Thibaudeau 2007-06-26 03:59:54 varchar(n) VS text