Re: Difference between varchar and text?

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: Difference between varchar and text?
Дата
Msg-id
19385.1353287446@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
Re: Difference between varchar and text? Jasen Betts <jasen@xnet.co.nz>
Re: Difference between varchar and text? David Johnston <polobo@yahoo.com>
Re: Difference between varchar and text? John R Pierce <pierce@hogranch.com>
Re: Difference between varchar and text? David Johnston <polobo@yahoo.com>
Re: Difference between varchar and text? Tom Lane <tgl@sss.pgh.pa.us>
Re: Difference between varchar and text? Vick Khera <vivek@khera.org>
Re: Difference between varchar and text? Craig Ringer <craig@2ndQuadrant.com>
Re: Difference between varchar and text? Vick Khera <vivek@khera.org>
Re: Difference between varchar and text? Jeff Janes <jeff.janes@gmail.com>
Re: Difference between varchar and text? Tom Lane <tgl@sss.pgh.pa.us>
Re: Difference between varchar and text? Abel Abraham Camarillo Ojeda <acamari@the00z.org>
Re: Difference between varchar and text? John R Pierce <pierce@hogranch.com>
Jeff Janes  writes:
> On Sun, Nov 18, 2012 at 4:35 PM, Vick Khera  wrote:
>> On Sun, Nov 18, 2012 at 7:24 PM, Craig Ringer  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

В списке pgsql-general по дате отправления
От: Jeff Janes
Дата:
От: Ike Nnabugwu
Дата:
FAQ