From: mariusz.kacala@wp.pl
To: pgsql-bugs@postgresql.org
Subject: BUG #12883: Configurable identifier length truncation.
Date: Fri, 20 Mar 2015 12:04:50 +0000
Message-ID: <20150320120450.2562.1359@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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)
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: mariusz.kacala@wp.pl
Subject: Re: BUG #12883: Configurable identifier length truncation.
In-Reply-To: <20150320120450.2562.1359@wrigleys.postgresql.org>
References: <20150320120450.2562.1359@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox