Search Postgresql Archives

Re: Regarding varchar max length in postgres

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

 



Durgamahesh Manne wrote:
> was there any specific reason that you have given max length for varchar is limited to 10485760 value?
> 
> why you have not given max length for varchar is unlimited like text datatype ?
> 
> character varying(n), varchar(n)variable-length with limit 
> character(n), char(n)fixed-length, blank padded
> textvariable unlimited length

The data type "text" has the same size limit of 1GB.
"character varying" (without type modifier) and "text" are pretty much
identical.

Since data of these types are loaded into memory when you read them
from or write them to the database, you usually start having problems
long before you reach that limit.

If you want to store huge text files, either store them outside the
database or use Large Objects, which can be read and written in chunks.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com





[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