BUG #12883: Configurable identifier length truncation.

Поиск
Список
Период
Сортировка
От mariusz.kacala@wp.pl
Тема BUG #12883: Configurable identifier length truncation.
Дата
Msg-id 20150320120450.2562.1359@wrigleys.postgresql.org
обсуждение исходный текст
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      12883
Logged by:          Mariusz Kacała
Email address:      mariusz.kacala@wp.pl
PostgreSQL version: 9.3.4
Operating system:   Windows, Linux
Description:

DOC says: 4.1.1. "(...) The system uses no more than NAMEDATALEN-1 bytes of
an identifier; longer names can be written in commands, but they will be
truncated. By default, NAMEDATALEN is 64 so the maximum identifier length is
63 bytes. (...)"

I have a suggestion (rather than bug):
I found default identifier truncation as quite problematic for application
consistency. If you execute SQL query with identifier longer than 63 chars,
postresql's console shows warning that identifier was truncated. It would be
really useful and just nice to make it configurable. We would define in DB
configuration (next to NAMEDATALEN 64) if identifier should be truncated or
if query execution should fail. I don't see any problems with throwing
exceptions because of too long identifier length instead of "silent"
truncation this identifier to shorter at DB level. Could it be done? Could
it cause any troubles?

Query example:
ALTER TABLE public.table_name ADD CONSTRAINT
"very_long_unique_constraint_contains_more_than_default_namedatalen_length"
UNIQUE (column_name)

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

Предыдущее
От: Asif Naeem
Дата:
Сообщение: Re: pg_upgrade failure on Windows Server
Следующее
От: John R Pierce
Дата:
Сообщение: Re: Problem when installing PL/Proxy with Windows OS