Skip to content

MG24 — Identifier exceeds Postgres's 63-byte limit

Group: Migration safety · Auto-fixable: no

Postgres truncates identifiers to 63 bytes (NAMEDATALEN - 1). A longer name is silently shortened, so two distinct names can collide and a migration can act on the wrong object. Use a shorter name.

bad: CREATE TABLE this_is_a_really_really_really_really_really_really_really_long_table_name (a int);

Disable this rule in banshee.toml:

[lint]
exclude = ["MG24"]

Or silence one line with -- noqa: MG24. See Linting.