Closed twiti7 closed 2 months ago
I found where is problem:
So where I have config which contain
TYPE INSERT REPLACE_AS_BOOLEAN SETTING:BOOLEAN_VALUE BOOLEAN_VALUES true:false
It produce good file with inserts but when it transfer data directly from oracle to pgsq oll boolean are true
If I comment all bool configs it works as expected.
You can disable BOOLEAN_VALUES in ora2pg.conf if you only have 0/1 values in this column, it is handled automatically.
Disabling solves a problem but, it looks like a bug. The same config file generates a file with inserts which is ok, but export directly to DB in all boolean fields have true values.
Commit 0217c3f might solve this issue.
I'm trying to move table from Oracle to Pgsql with boolean conversion.
In oracle table looks like below
NAME VARCHAR2(50 BYTE) BOOLEAN_VALUE NUMBER(1,0)
in PostgreSQL
create table setting ( name varchar(50) not null, boolean_value boolean );
When I set conversion in pgconfig 'MODIFY_TYPE SETTING:BOOLEAN_VALUE:boolean' or ' REPLACE_AS_BOOLEAN SETTING:BOOLEAN_VALUE BOOLEAN_VALUES true:false '
in std output or to file I'm getting proper result
ora2pg | INSERT INTO setting (name,boolean_value) VALUES (E'LAST_ACTIVATION',NULL); ora2pg | INSERT INTO setting (name,boolean_value) VALUES (E'ANOTHER','t');
but when I made direct import to pgsql all boolean are true on version 24 and 24.3 too