I've been experimenting with migrating data from Oracle using the MTK tool, and am running into an issue with boolean columns. Oracle doesn't have a native boolean datatype, so booleans as stored in a NUMBER(1) column, using the values 0 or 1. I believe this is fairly idiomatic in the oracle world. Postgres, of course, does have a native boolean datatype which we want to use. When running MTK, i can, of course, use customColTypeMapping to map those columns in a native boolean column type in the DDL. But the data transfer doesn't work, because you can't store the number 1 in a boolean field, and there is no implicit cast to boolean. Right now, the only way I can get it to work is to migrate it as a numeric field, and doing an after-the-fact conversion of the data into boolean fields after all the data has been migrated. Is there a way to directly import these fields as booleans? I would imagine that would be much faster than importing and converting after the fact.
... View more