Parameter · Preset Options
max_identifier_length
Shows the maximum identifier length.
- Default:
63 - Type: integer
- Range: 63 … 63
- Applies: Read-only
In plain words
Names of tables, columns, indexes and other objects can be at most 63 bytes. PostgreSQL does not reject longer names: it cuts them to 63 bytes and prints a notice, which can cause surprises when two long names become identical.
For DBAs and operators
NAMEDATALEN − 1 (64 − 1), compile-time. The limit is in bytes, so names with multibyte UTF-8 characters fit fewer characters. Truncation happens in the parser: NOTICE: identifier "customer_order_line_items_with_discounts_and_taxes_aggregated_by_month" will be truncated to "customer_order_line_items_with_discounts_and_taxes_aggregated_b".
Pitfalls: ORMs and migration tools generating long constraint/index names that collide after truncation (ERROR: relation "…" already exists), and partition or auto-generated names (…_pkey, …_idx) that PostgreSQL shortens itself.
How to change it
Fixed when PostgreSQL was built or the cluster was initialised. You can only read it.