Re: Populating a MySQL database using a PostgreSQL dump
Posted by:
Markus Popp
Date: September 15, 2005 01:47PM
> CREATE TABLE game (
> id serial NOT NULL,
> name character varying(50) NOT NULL,
> "type" character varying(20) NOT NULL,
> gamemaster_member_id integer
> );
Try to write it as
CREATE TABLE game (
id int NOT NULL AUTO_INCREMENT PRIMARY KEY,
name varchar(50) NOT NULL,
type varchar(20) NOT NULL,
gamemaster_member_id int);
serial = int with AUTO_INCREMENT, define it with a primary key;
character varying(x) = varchar(x)
numeric(x,y) becomes decimal(x,y)
The most of the other common variable types remain the same ;-).
Of course, you also have to delete PostgreSQL specific settings like 'SET search_path = public, pg_catalog;' to make the dump work with MySQL.
I hope that helps.
Markus
--
Markus Popp, Web Developer, mysql.com
Oracle Austria
Subject
Views
Written By
Posted
8175
September 12, 2005 08:03AM
Re: Populating a MySQL database using a PostgreSQL dump
4593
September 15, 2005 01:47PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.