Diff for scripts/perl/oracle/oracledump.pl between version 1.15 and 1.16
| version 1.15, 2007/03/17 07:27:43 |
version 1.16, 2007/03/18 04:25:38 |
|
|
| #!/usr/bin/perl |
#!/usr/bin/perl |
| |
|
| # $Platon: scripts/perl/oracle/oracledump.pl,v 1.14 2007-03-17 06:47:38 nepto Exp $ |
# $Platon: scripts/perl/oracle/oracledump.pl,v 1.15 2007-03-17 07:27:43 nepto Exp $ |
| |
|
| use strict; |
use strict; |
| |
|
|
|
| |
|
| if ( !defined $opt_no_create_info ) { |
if ( !defined $opt_no_create_info ) { |
| if ($opt_mysql_compliant_dump) { |
if ($opt_mysql_compliant_dump) { |
| printf( " %1s%-22s %-15s %-21s %-8s\n", |
printf( " %1s%-32s %-15s %-21s %-8s\n", |
| ( $c != 1 ? ',' : ' ' ), |
( $c != 1 ? ',' : ' ' ), |
| lc( $row[0] ), |
'`'.lc( $row[0] ).'`', |
| ( $row[1] eq 'NUMBER' |
( $row[1] eq 'NUMBER' |
| ? ( int($row[4]) > 0 |
? ( int($row[4]) > 0 |
| ? 'DECIMAL(' . $row[3] . ', ' . $row[4] . ')' |
? 'DECIMAL(' . $row[3] . ', ' . $row[4] . ')' |
|
|
| $sth = $dbh->prepare($query); |
$sth = $dbh->prepare($query); |
| $sth->execute() || die $DBI::errstr; |
$sth->execute() || die $DBI::errstr; |
| |
|
| |
if ($opt_mysql_compliant_dump) { |
| |
foreach (@column_names) { |
| |
$_ = '`'.$_.'`'; |
| |
} |
| |
} |
| |
|
| while (@row = $sth->fetchrow_array()) |
while (@row = $sth->fetchrow_array()) |
| { |
{ |
| print <<MARK; |
print <<MARK; |
Platon Group <platon@platon.org> http://platon.org/
|
|