Search Postgresql Archives

Re: Difference between varchar and text?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff Janes <jeff.janes@xxxxxxxxx> writes:
> On Sun, Nov 18, 2012 at 4:35 PM, Vick Khera <vivek@xxxxxxxxx> wrote:
>> On Sun, Nov 18, 2012 at 7:24 PM, Craig Ringer <craig@xxxxxxxxxxxxxxx> wrote:
>>> 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.

> Just looking at the timing of the below, I'd say the optimization of
> varchar(n) to text took place in 9.1.

9.1 is bright enough to optimize that specific case; 9.2 covers some
additional cases like varchar(m) to varchar(n) for m <= n.  I think also
that 9.2 avoids rebuilding indexes on the affected column in some of
these cases, but 9.1 did not.

			regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux