Truncation of identifiers

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Truncation of identifiers
Дата
Msg-id CAEepm=16Gcuu1WRk5-jqheMvNxOSZ_c98vMKC1qDwOiNBR-Z0Q@mail.gmail.com
обсуждение исходный текст
Ответы Re: Truncation of identifiers  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi hackers

Wouldn't it be better to raise an error when identifiers are too long,
rather than accepting but truncating them?  I'm not aware of any other
database that does this.  If you're using oversized identifiers you
could finish up using more than one way to refer to the same database
object, and then your queries will have a different meaning if
NAMEDATALEN ever changes.  If you're automatically generating
identifier names (say for partitioning), wouldn't you rather find out
about the size being too long immediately, rather than later when you
try to generate a second long name that collides with the first after
truncation?  I suppose there could be a GUC
truncate_oversized_identifiers defaulting to off, which could be
turned on by those who really prefer the current
truncate-but-raise-NOTICE behaviour.

-- 
Thomas Munro
http://www.enterprisedb.com



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: PgConf.US Hackers Track CFP
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Truncation of identifiers