6 |
# mysqldump my_db_name | ./mysql2pgsql | psql pg_db_name |
# mysqldump my_db_name | ./mysql2pgsql | psql pg_db_name |
7 |
# |
# |
8 |
# Convert mysqldump file (from MySQL) to something readable by psql ! |
# Convert mysqldump file (from MySQL) to something readable by psql ! |
9 |
|
# |
10 |
|
# homepage: http://www.rot13.org/~dpavlin/projects.html |
11 |
|
|
12 |
# 1999-12-15 DbP -- Dobrica Pavlinusic <dpavlin@linux.hr> |
# 1999-12-15 DbP -- Dobrica Pavlinusic <dpavlin@rot13.org> |
13 |
# 1999-12-26 DbP don't make serial from auto_increment, create all manually |
# 1999-12-26 DbP don't make serial from auto_increment, create all manually |
14 |
# (to set start value right) |
# (to set start value right) |
15 |
# 2000-01-11 DbP now creates sequences with correct value |
# 2000-01-11 DbP now creates sequences with correct value |
16 |
# 2000-04-25 DbP import into CVS (at cvs.linux.hr) |
# 2000-04-25 DbP import into CVS (at cvs.linux.hr) |
17 |
|
|
18 |
|
# see rest of changelog at http://cvs.linux.hr/cvsweb.cgi/sql/mysql2pgsql |
19 |
|
|
20 |
use DBI; |
use DBI; |
21 |
|
|
22 |
if (!defined($ARGV[0]) || !defined($ARGV[1])) { |
if (!defined($ARGV[0]) || !defined($ARGV[1])) { |