Ispirer Website Ispirer Toolkit Overview Free Trial

Ispirer Toolkit: Data Type Mapping

Ispirer Toolkit allows you to change the column type for some tables or all tables and database variables and parameters at the same time.

It can be especially efficient for the following cases.

For example, the smallint type in PostgreSQL (smallint is a two-byte signed integer) requires an explicit cast for numbers or when another integer variable is assigned to the smallint one. If you replace all smallint variables with integer ones, then this problem will disappear, and this will not lead to type incompatibility.

You can also use data type mapping, if you need to increase the counter field dimension. For example, a column is allowed to store a 10-digit number, but it's time to increase it to 12 or higher. Of course, it can be done in the source database, but sometimes tables contain huge volumes of data or are constantly used without the possibility for long downtime to change the column type. In this case, migration is a perfect opportunity to replace the types with the correct ones.

It can also be useful to improve performance in cases where tables are joined in a query using columns that have different (but compatible) types.

 SELECT ... 
 FROM table1 t1 
 JOIN table2 t2 on t1.numeric_field = t2.bigint_field ...

The field can be used in various queries and compared with fields of other types. In this case, you need to choose a higher priority option for the column type. This change requires a thorough analysis of the entire code, but can be very useful for optimizing mission-critical queries.

As you can see Ispirer Toolkit can be very useful for making such changes to the database.

How to Change Objects Names During Migration
Conversion Options
More Tips and Tricks

If you have any questions or face any difficulties, please contact our support team at