Re: Regarding varchar max length in postgres

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: Regarding varchar max length in postgres
Дата
Msg-id 127747635e62a00d2abb7f25bea0c3a5aaaa2967.camel@cybertec.at
обсуждение исходный текст
Ответ на Re: Regarding varchar max length in postgres  (Durgamahesh Manne <maheshpostgres9@gmail.com>)
Список pgsql-general
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



В списке pgsql-general по дате отправления:

Предыдущее
От: Arthur Zakirov
Дата:
Сообщение: Re: Enabling autovacuum per table
Следующее
От: Thomas Kellerer
Дата:
Сообщение: Re: Regarding varchar max length in postgres