darold / ora2pg

Ora2Pg is a free tool used to migrate an Oracle database to a PostgreSQL compatible schema. It connects your Oracle database, scan it automatically and extracts its structure or data, it then generates SQL scripts that you can load into PostgreSQL.
http://www.ora2pg.com/
GNU General Public License v3.0
1.01k stars 342 forks source link

Error migrating float from Oracle to float8 in PostGre #1579

Closed helenaadi closed 1 year ago

helenaadi commented 1 year ago

Hello,

We used ora2pg tool to migrate our database. We noticed a problem with the data in the source / target database. Oracle : RESULT

value FLOAT

PostGre RESULT

value float8

When we launch this request (we the squirrel tool and also with a c# executable) we have the following results : select value from result;

Oracle

0.5786113328013453 Postgre

0.5786113328013452

Do you know how we can avoid this behavior ?

Thank you for your help

darold commented 1 year ago

You can not avoid this behavior, if you need the exact value you should use numeric at PostgreSQL side. For example set:

DATA_TYPE    float:numeric

normally PG will stores the value as it has been exported from Oracle.