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 -- Sent via pgsql-hackers mailing list (email@example.com) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers