Re: Difference between varchar and text? - Mailing list pgsql-general

From Joshua D. Drake
Subject Re: Difference between varchar and text?
Date
Msg-id 50982E64.9010403@commandprompt.com
Whole thread Raw
In response to Difference between varchar and text?  (Moshe Jacobson <moshe@neadwerx.com>)
List pgsql-general
On 11/05/2012 12:46 PM, Moshe Jacobson wrote:
> Is there any practical difference between defining a column as a
> varchar(n) vs. a varchar vs. a text field?

No except for your already noted exception that you can limit the size
of varchar.

>
> I've always been under the impression that if I am wanting to index a
> varchar column, it is better to set a maximum length.

This entirely depends on what you are doing.

JD
--
Command Prompt, Inc. - http://www.commandprompt.com/
PostgreSQL Support, Training, Professional Services and Development
High Availability, Oracle Conversion, Postgres-XC
@cmdpromptinc - 509-416-6579


pgsql-general by date:

Previous
From: John R Pierce
Date:
Subject: Re: Difference between varchar and text?
Next
From: "David Johnston"
Date:
Subject: Re: Difference between varchar and text?