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  <br...@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to