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

From Julien Rouhaud
Subject Re: Proposal to Compile a 256-Byte Identifier Length Version Alongside the Current 64-Byte Version
Date
Msg-id f3ci4oja5gddlkr24lc6i4ykblbmhc4zvpc4fmq7etx4rxserh@lo7yb5j46npf
Whole thread Raw
In response to Re: Proposal to Compile a 256-Byte Identifier Length Version Alongside the Current 64-Byte Version  (Laurenz Albe <laurenz.albe@cybertec.at>)
List pgsql-general
On Tue, Oct 10, 2023 at 08:22:55AM +0200, Laurenz Albe wrote:
> On Tue, 2023-10-10 at 11:49 +0800, David HJ wrote:
> > 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.
>
> Anyway, you are not the first person to hit the limit, so there is clearly a
> pain that some people feel.
>
> > 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.
>
> Wouldn't it be a good solution if we promote the #define to a configure option,
> like "./configure --identifier-length-limit=256"?

Note that there was some thread recently [1] where the possibility of having
some kind of compilation matrix to generate multiple set of binaries with
various compile-time values was discussed, so I guess it could fit well with
that approach.

[1]
https://www.postgresql.org/message-id/20230630211153.kbysulcjedxa5ii6@awork3.anarazel.de
and following messages



pgsql-general by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: Proposal to Compile a 256-Byte Identifier Length Version Alongside the Current 64-Byte Version
Next
From: Tatsuo Ishii
Date:
Subject: Re: Proposal to Compile a 256-Byte Identifier Length Version Alongside the Current 64-Byte Version