Toad World® Forums

Postgres model compare - Serial vs. Integer not detected correctly


when comparing an existing model against the database, TDM doesn’t recognize serial/bigserial columns in the database correctly.

If the columns in the model are defined as BigSerial and the columns are created as such in the database, the model compare will incorrectly flag them as changed and display the reverse engineered columns as BigInt. Which is - strictly speaking - correct - but it’s not really helpful. Technically the columns is a bigint but the both the JDBC driver and pgAdmin can detect the fact that a column was defined as a bigserial, so it should be possible somehow to compare this correctly.

I’m using TDM 5.1 and Postgres 9.3

Hi, we will look into the matter. Thanks!


After 3 years, the problem still persists as of version and PostgreSQL 9.x.

Could you please provide a solution for this problem? It is cumbersome to hunt every serial type in reverse engineered model or in change scripts, and virtually impossible in large projects.

Other tools detects serial type correctly.

Also please bear in mind that default value is also part of the problem. Since it is detected as integer, default value is also detected as nextval(…).

Kind Regards,

Hi Ozum,

I’ve created enhancement request (TDM-3054) to add this feature in any future version of TDM. You can always put your idea into the Idea Pond too.