Re: Identifier gets truncated
От | Bruce Momjian |
---|---|
Тема | Re: Identifier gets truncated |
Дата | |
Msg-id | 20130110162334.GA24281@momjian.us обсуждение исходный текст |
Ответ на | Identifier gets truncated (Peter Kroon <plakroon@gmail.com>) |
Список | 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(> x1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111int, test(> x1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112int); NOTICE: identifier "x1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"will betruncated to "x11111111111111111111111111111111111111111111111111111111111111" NOTICE: identifier "x1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112"will betruncated to "x11111111111111111111111111111111111111111111111111111111111111" ERROR: column "x11111111111111111111111111111111111111111111111111111111111111" specified more than once -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +
В списке pgsql-general по дате отправления: