9 |
|
|
10 |
# 2000-08-30 DbP -- Dobrica Pavlinusic <dpavlin@rot13.org> |
# 2000-08-30 DbP -- Dobrica Pavlinusic <dpavlin@rot13.org> |
11 |
# based on mysql2pgsql |
# based on mysql2pgsql |
12 |
|
# |
13 |
|
# Warning: bool datatype is converted to char(1) which will break |
14 |
|
# your application if you tend to check true values with |
15 |
|
# if ($foo) |
16 |
|
# and not with |
17 |
|
# if ($foo = 't') |
18 |
|
# In data from InterBase it will always return true which is wrong! |
19 |
|
# |
20 |
|
|
21 |
$create=0; # inside create table? |
$create=0; # inside create table? |
22 |
$table=""; |
$table=""; |
49 |
s/\w*int\d+/ int/gi; |
s/\w*int\d+/ int/gi; |
50 |
|
|
51 |
# bool -> char(1) |
# bool -> char(1) |
52 |
s/\w*bool/ char(1)/gi; |
if (/bool/i) { |
53 |
|
s/\w*bool/ char(1)/gi; |
54 |
|
print STDERR "Warning: bool emulated by char(1)\n\n"; |
55 |
|
} |
56 |
|
|
57 |
# datetime -> timestamp |
# datetime -> timestamp |
58 |
s/datetime/timestamp/gi; |
s/datetime/timestamp/gi; |