NAME

my2pg - MySQL -> PostgreSQL dump conversion utility.


SYNTAX

        mysqldump db | ./my2pg.pl [-nds] > pgsqldump.sql
        vi libtypes.c
        make
        psql database < pgsqldump.txt
where
pgsqldump.sql
- file suitable for loading into PostgreSQL.

libtypes.c
- C source for emulated MySQL types (ENUM, SET) generated by my2pg


OVERVIEW

my2pg utility attempts to convert MySQL database dump to Postgres's one. my2pg performs such conversions:

It encloses dump in transaction block to prevent single errors during data load.


COMMAND-LINE OPTIONS

My2pg takes the following command-line options:

-n
Convert *CHAR DEFAULT '' NOT NULL types to *CHAR NULL. Postgres can't load empty '' strings in NOT NULL fields.

-d
Add double quotes around table and column names

-h
Show usage banner.

-s
Do not attempt to convert data. Currently my2pg only tries to convert date and time data.


SIDE EFFECTS


BUGS

Known bugs are:


AUTHORS

(c) 2000-2002 Maxim V. Rudensky (fonin@ziet.zhitomir.ua) (developer, maintainer)

(c) 2000 Valentine V. Danilchuk (valdan@ziet.zhitomir.ua) (original script)


CREDITS

Great thanks to all those people who provided feedback and make development of this tool easier.

Jeff Waugh <jaw@ic.net>

Joakim Lemström <jocke@bytewize.com> || <buddyh19@hotmail.com>

Yunliang Yu <yu@math.duke.edu>

Brad Hilton <bhilton@vpop.net>

If you are not listed here please write to me.


LICENSE

BSD