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

From: David HJ <chuxiongzhong(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Proposal to Compile a 256-Byte Identifier Length Version Alongside the Current 64-Byte Version
Date: 2023-10-10 03:49:00
Message-ID: CAKabb9VWBgeLfVxq=SqfW72W8wP5c3-nQBexowubxahVPpLK3Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

*Dual Compilation:*
To maintain backward compatibility and to offer more flexibility, I suggest
compiling this 256-byte version alongside the existing 64-byte version.
Users could then choose which version best suits their needs.

*Backward Compatibility:*
I understand that this change could affect backward compatibility. Offering
this as an alternative compilation could be a way to mitigate those
concerns. I am open to suggestions on how this could be implemented to
minimize disruptions.

I look forward to your feedback and hope we can make PostgreSQL even more
adaptable to various needs.

Best regards,
Chuxiong

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2023-10-10 06:22:55 Re: Proposal to Compile a 256-Byte Identifier Length Version Alongside the Current 64-Byte Version
Previous Message Michał Kłeczek 2023-10-09 10:39:26 GIST index and ORDER BY