Search Postgresql Archives

Re: Difference between varchar and text?

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

 



David Johnston <polobo@xxxxxxxxx> writes:
> On Nov 17, 2012, at 20:43, John R Pierce <pierce@xxxxxxxxxxxx> wrote:
>> I think he meant a tiny tiny bit faster, primarily due to not having to validate the length.

> Maybe... But I would presume a "varchar with no limit" does not validate length...

There is overhead from the type system for varchar, whether or not it
has a length limit --- you'll get at least some RelabelType nodes in
expression trees, and those don't have zero cost to execute.

I'd generally recommend using "text" if you don't have any interest in
enforcing a specific length limit.

			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