From: | Craig Ringer <craig(at)2ndQuadrant(dot)com> |
---|---|
To: | Vick Khera <vivek(at)khera(dot)org> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Difference between varchar and text? |
Date: | 2012-11-19 00:24:35 |
Message-ID: | 50A97C43.50009@2ndQuadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 11/19/2012 12:57 AM, Vick Khera wrote:
>
>
> On Sun, Nov 18, 2012 at 2:29 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us
> <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>> wrote:
>
> I'd generally recommend using "text" if you don't have any interest in
> enforcing a specific length limit.
>
>
> Will there be any table re-writing if I do an alter to change the
> column type from varchar(N) to text? I have some really old (from
> 2000 and 2001) schemas that have a metric boatload of data in them,
> and I'd like to remove the old artificial limit on them.
That depends on the PostgreSQL version. Some changes were made to
improve that recently; from memory, it used to require rewriting, so
people would sometimes work around it with (dodgy and unsafe) hacks
directly to the system catalogs. I'm not sure if "recently" is 9.2 or 9.3.
--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Vick Khera | 2012-11-19 00:35:46 | Re: Difference between varchar and text? |
Previous Message | Craig Ringer | 2012-11-19 00:21:22 | Re: Parser - Query Analyser |