Re: limit of data type character varying

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: limit of data type character varying
Дата
Msg-id CAKFQuwbt5n3rLABy0fX2wCWENTtQwRDTPF5dzJy1P9t_-taizA@mail.gmail.com
обсуждение исходный текст
Ответ на limit of data type character varying  (Mark Phillips <mark.phillips@mophilly.com>)
Список pgsql-general
On Wed, Nov 25, 2020 at 1:43 PM Mark Phillips <mark.phillips@mophilly.com> wrote:
The actual maximum length supported by postgresql 12 is 10,485,760. We dug into the postgres code and found a limit in the config with a comment dating it to the pg 8.5 era. Being the simple folk that we are, we changed the setting to the higher value. Unfortunately, pg 12 raised some errors of its own.

This seems like a bug in SymmetricDS, which ought to set the maximum length to that supported by the target database.

On the other hand, one could argue that a higher limit in postgres is sensible these days. 


I find the documentation's recommendation relevant here:

In any case, the longest possible character string that can be stored is about 1 GB. (The maximum value that will be allowed for n in the data type declaration is less than that. It wouldn't be useful to change this because with multibyte character encodings the number of characters and bytes can be quite different. If you desire to store long strings with no specific upper limit, use text or character varying without a length specifier, rather than making up an arbitrary length limit.)


David J.

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

Предыдущее
От: Mark Phillips
Дата:
Сообщение: limit of data type character varying
Следующее
От: Huan Ruan
Дата:
Сообщение: Potential BRIN Index Corruption