Bug #45148 incorrect decimal conversion from Postgres 8.1
Submitted: 28 May 2009 1:03 Modified: 28 May 2009 11:47
Reporter: Matthew Lord Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Migration Toolkit Severity:S3 (Non-critical)
Version:1.1.12 OS:Windows
Assigned to: CPU Architecture:Any

[28 May 2009 1:03] Matthew Lord
Description:
Incorrect decimal conversion from Postgres 8.1.4 to MySQL 5.0.   Here's
an example:

In Postgres the column is defined as:
document_num numeric

And that is errantly converted to:
document_num DECIMAL(131089, 0)

This definition causes the CREATE TABLE statement to fail during
the migration with the following error:
Too big precision 131089 specified for column 'num_documento'. Maximum is 65.

How to repeat:
N/A

Suggested fix:
We should instead convert the type to:
DECIMAL( 65, 0 ) or integer
[28 May 2009 11:47] Susanne Ebrecht
This is related to the JDBC driver.

We have no native migration method for PostgreSQL to MySQL at the moment.

Bug #16508 wants a native PostgreSQL to MySQL migration which will fix these issue here too.

I will set this as duplicate of bug #16508.
[28 May 2009 11:50] Susanne Ebrecht
I forgot to mention. Workaround here is to change the numeric values manually before transfering to the MySQL system.