--- pgsql2interbase 2000/07/31 06:19:20 1.1 +++ pgsql2interbase 2000/07/31 08:55:32 1.2 @@ -9,6 +9,14 @@ # 2000-08-30 DbP -- Dobrica Pavlinusic # based on mysql2pgsql +# +# Warning: bool datatype is converted to char(1) which will break +# your application if you tend to check true values with +# if ($foo) +# and not with +# if ($foo = 't') +# In data from InterBase it will always return true which is wrong! +# $create=0; # inside create table? $table=""; @@ -41,7 +49,10 @@ s/\w*int\d+/ int/gi; # bool -> char(1) - s/\w*bool/ char(1)/gi; + if (/bool/i) { + s/\w*bool/ char(1)/gi; + print STDERR "Warning: bool emulated by char(1)\n\n"; + } # datetime -> timestamp s/datetime/timestamp/gi;