Postgre Identifier “table_name_abc” will be truncated to “table_name”

Serkan SAKINMAZ
1 min readSep 4, 2023

In your application, when you automatically generate the table from code, the table name could be different from how you create it. The challenge is, that you can not see any errors. If you deep dive to database logs, you can see the info message like below

INFO:root: Database Message: NOTICE: identifier “table_name_abc” will be truncated to “table_name”

In PostgreSQL, the table identifier is 63 bytes. If your table names extend this value, Postgres will truncate the latest characters. You can see the sample INFO message at the below

There are two options to fix this issue

  • Option 1 — Change the settings of PosgreSQL
  • Option 2 —Change the identifier to shorten the table name

In the first option, you need to change the Postgre source code and compile it. I would not recommend it since it needs some administration effort.

As a second option, you can change the identifier which would be the easiest option

--

--