From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Peter Kroon <plakroon(at)gmail(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Identifier gets truncated |
Date: | 2013-01-10 16:23:34 |
Message-ID: | 20130110162334.GA24281@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Jan 10, 2013 at 03:36:32PM +0100, Peter Kroon wrote:
> When an identifier has more then 63 chars it gets truncated.
> This is fine.
> However PostgreSQL fails to notice that it might truncate to an identifier
> which already exist.
> Does PostgreSQL got a setting that will never create a duplicate identifier?
>
> really_long_name_table_A -> really_long_na
> really_long_name_table_B -> really_long_na
Well, if an indenfier truncates to a name that conflicts with another
one, you will get an error:
test=> create table test(
test(> x1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 int,
test(> x1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112 int);
NOTICE: identifier "x1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" will be truncated to "x11111111111111111111111111111111111111111111111111111111111111"
NOTICE: identifier "x1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112" will be truncated to "x11111111111111111111111111111111111111111111111111111111111111"
ERROR: column "x11111111111111111111111111111111111111111111111111111111111111" specified more than once
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2013-01-10 17:06:45 | Re: When to run Vacuum in postgres 9.0.4 |
Previous Message | Lonni J Friedman | 2013-01-10 16:07:39 | data corruption when using base backups generated from hot standby |