BUG #13659: Constraint names truncated without error - Mailing list pgsql-bugs

From jtc331@gmail.com
Subject BUG #13659: Constraint names truncated without error
Date
Msg-id 20151001144027.348.87665@wrigleys.postgresql.org
Whole thread Raw
Responses Re: BUG #13659: Constraint names truncated without error  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      13659
Logged by:          James Coleman
Email address:      jtc331@gmail.com
PostgreSQL version: 9.4.4
Operating system:   OS X (and Linux etc.)
Description:

If I create the following schema:

create table t(n integer);
alter table t add constraint
  test_contrainst_that_has_a_very_long_name_to_trigger_the_character_limit
  check (n != 1);

the constraint name appears to be automatically truncated without error, as
confirmed with:

SELECT tc.constraint_name, tc.table_name
FROM information_schema.table_constraints AS tc
WHERE tc.table_name = 't'

Since PG raises errors when index names, for example, are too long, I
believe it should do the same for constraints. I discussed this with Magnus
at PostgresOpen and he agreed that the behavior should be the same and that
if it weren't it was likely a bug.

pgsql-bugs by date:

Previous
From: jesper@udby.com
Date:
Subject: BUG #13658: DELETE with syntax error in subselect deletes ALL
Next
From: Tom Lane
Date:
Subject: Re: BUG #13655: Incorrect Syntax Error