← all rules

identifier-too-long

warning

Identifier longer than 63 bytes

Why it's unsafe

PostgreSQL truncates identifiers to 63 bytes, so an identifier written longer than that is silently shortened — and two names sharing a 63-byte prefix silently collide.

Safe rewrite

Shorten the identifier to 63 bytes or fewer so PostgreSQL does not silently truncate it.

Example

Try it in the playground →

Unsafe

ALTER TABLE users ADD COLUMN a_very_long_column_name_that_exceeds_the_postgres_identifier_limit text;

Related