Re: Proposal to Compile a 256-Byte Identifier Length Version Alongside the Current 64-Byte Version

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема Re: Proposal to Compile a 256-Byte Identifier Length Version Alongside the Current 64-Byte Version
Дата
Msg-id 20231010.155317.1680295102845562806.t-ishii@sranhm.sra.co.jp
обсуждение исходный текст
Ответ на Proposal to Compile a 256-Byte Identifier Length Version Alongside the Current 64-Byte Version  (David HJ <chuxiongzhong@gmail.com>)
Ответы Re: Proposal to Compile a 256-Byte Identifier Length Version Alongside the Current 64-Byte Version
Список pgsql-general
> Hello PostgreSQL Community,
> 
> I am writing to propose an alternative compilation of PostgreSQL that
> allows for a 256-byte identifier length limit, alongside the existing
> 64-byte version.
> 
> *Problem:*
> The current limit of 63 bytes can be quite restrictive, especially for
> databases that use multi-byte character sets like UTF-8. In such cases, a
> Chinese character takes up 3 bytes, limiting the name to just 21 characters.
> 
> *Use-Case:*
> In specific use-cases, table names like
> "能源消耗统计_全球主要国家石油与天然气使用量_年度碳排放与可再生能源比例表" and
> "气候变化研究_全球主要地区极端天气事件频率_年度灾害损失与应对措施表" can far exceed the current limit.
> 
> *Proposed Solution:*
> I propose that we offer an alternative compilation of PostgreSQL that
> increases the NAMEDATALEN constant to allow for 256-byte identifiers. This
> would be particularly useful for databases that make extensive use of
> multi-byte character sets like UTF-8.

Another solution would be, letting the meaning of NAMEDATALEN to be
number of *characters*, not the number of bytes. This way, you can use
up to 64 UTF-8 characters. In my understanding MySQL already does this
way. I know this requires non trivial code modifications to PostgreSQL
but would be better than to make binaries with random NAMEDATALEN
values.

Best reagards,
--
Tatsuo Ishii
SRA OSS LLC
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp

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

Предыдущее
От: Julien Rouhaud
Дата:
Сообщение: Re: Proposal to Compile a 256-Byte Identifier Length Version Alongside the Current 64-Byte Version
Следующее
От: Laurenz Albe
Дата:
Сообщение: Re: Proposal to Compile a 256-Byte Identifier Length Version Alongside the Current 64-Byte Version