Обсуждение: Increase the length of identifers from 63 characters to 128 characters or more

Поиск
Список
Период
Сортировка
One-line Summary: There are use cases for long table names so people might use Oracle and MS SQL Server because Postgres does not support table names longer than 63 characters, so the max character limit should be increased to 128 or higher.

Business Use-case: I want to create a table named things_that_take_up_a_lot_of_storage_and_space_on_a_computer_and_hard_drive of 75 characters. I also want to create a column named thing_that_takes_up_a_lot_of_storage_and_space_on_a_computer_and_hard_drive_id of 78 characters. People have asked for this feature before. For more details, please see and visit https://www.reddit.com/r/PostgreSQL/comments/6kyyev/i_have_hit_the_table_name_length_limit_a_number/. In particular, see https://www.reddit.com/r/PostgreSQL/comments/6kyyev/i_have_hit_the_table_name_length_limit_a_number/#:~:text=been%20wondering%20the%20same which states I've been wondering the same. It comes down to changing NAMEDATALEN documented here: https://www.postgresql.org/docs/9.3/static/runtime-config-preset.html and someone made a patch that changes it to 256 characters: https://gist.github.com/langner/5c7bc1d74a8b957cab26

The Postgres people seem to be resistant to changing this. I accept that where possible one should keep identifiers short but descriptive but I haven't seen a good reason WHY it shouldn't be changed since there are many instances when remaining within 63 characters is quite difficult.

Sincerely,

Peter Burbery

Re: Increase the length of identifers from 63 characters to 128 characters or more

От
"David G. Johnston"
Дата:


On Monday, May 6, 2024, Peter Burbery <petercullenburbery@gmail.com> wrote:

Business Use-case: I want to create a table named things_that_take_up_a_lot_of_storage_and_space_on_a_computer_and_hard_drive of 75 characters. I also want to create a column named thing_that_takes_up_a_lot_of_storage_and_space_on_a_computer_and_hard_drive_id of 78 characters. People have asked for this feature before.


We have a mailing list archive.  You should do the same research of past requests and discussions on it since that is where you will find the developers involved in the discussion and can find out the past reasoning as to why this hasn’t been changed.

 David J.

On 2024-May-06, David G. Johnston wrote:

> On Monday, May 6, 2024, Peter Burbery <petercullenburbery@gmail.com> wrote:
> 
> >
> > Business Use-case: I want to create a table named things_that_take_up_a_
> > lot_of_storage_and_space_on_a_computer_and_hard_drive of 75 characters. I
> > also want to create a column named thing_that_takes_up_a_
> > lot_of_storage_and_space_on_a_computer_and_hard_drive_id of 78
> > characters. People have asked for this feature before.
>
> We have a mailing list archive.  You should do the same research of past
> requests and discussions on it since that is where you will find the
> developers involved in the discussion and can find out the past reasoning
> as to why this hasn’t been changed.

There's been a lot of discussion on this topic -- the most recent seems
to be [1] which will lead you to the older patches by John Naylor at [2].

In short, it's not that we're completely opposed to it, just that
somebody needs to do some more work in order to have a good
implementation for it.

[1] https://www.postgresql.org/message-id/324703.1696948627%40sss.pgh.pa.us
[2]
https://www.postgresql.org/message-id/flat/CALSd-crdmj9PGdvdioU%3Da5W7P%3DTgNmEB2QP9wiF6DTUbBuMXrQ%40mail.gmail.com

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"La primera ley de las demostraciones en vivo es: no trate de usar el sistema.
Escriba un guión que no toque nada para no causar daños." (Jakob Nielsen)