Re: Regarding varchar max length in postgres

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема Re: Regarding varchar max length in postgres
Дата
Msg-id 69efedf7-6c12-cb3b-4fc6-e5ae9204bfc4@gmx.net
обсуждение исходный текст
Ответ на Re: Regarding varchar max length in postgres  (Durgamahesh Manne <maheshpostgres9@gmail.com>)
Список pgsql-general
Durgamahesh Manne schrieb am 15.10.2018 um 11:05:
>         On 10/5/18 8:18 AM, Durgamahesh Manne wrote:
>         > Hi
>         >
>         > please let me know the max length of varchar  & text in postgres
> 
>         https://www.postgresql.org/docs/10/static/datatype-character.html
> 
>      Hi 
> 
>     Thank you for this information
> 
>     as per the postgresql documentation   please ignore incomplete message i mailed to respected community members 
> 
>      If |character varying |is used without length specifier, the type accepts strings of any size 
> 
>     but varchar does not accept more than this 10485760 value
> 
> 
>    create table test(id serial primary key, str varchar(10485761));
> 
>      ERROR: length for type varchar cannot exceed 10485760 

Further down on that page the overall limit is documented: 

    In any case, the longest possible character string that can be stored is about 1 GB

So the part that you quoted implicitly means "accepts strings of any size  - up to the maximum of 1GB"
Maybe it makes sense to make that clearer at that point.

Regards
Thomas




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

Предыдущее
От: Durgamahesh Manne
Дата:
Сообщение: Re: Regarding varchar max length in postgres
Следующее
От: Durgamahesh Manne
Дата:
Сообщение: Re: Regarding varchar max length in postgres