pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gerd Terlutter <gerd@MplusB.de>
To: K. Suresh <suresh@ooty.tenet.res.in>
Cc: pgsql-php@postgresql.org <pgsql-php@postgresql.org>
Subject: Re: mysql to pgsql
Date: Thu, 28 Aug 2003 12:02:25 +0200
Message-ID: <3F4DD331.4050502@MplusB.de> (raw)
References: <3F4D87F2.980EA931@ooty.tenet.res.in>

K. Suresh wrote:
> Hello,
> 
> I have a database application with Java and PHP clients. I used mysql
> with 64 tables. Now, we have decided to use pgsql. Please suggest the
> migration procedure.
> 
> Thanks.
> 
> Suresh
> 

Hi all,
for a few weeks i had the same problem. I found the attached script, doc 
is online :
http://ns2.ziet.zhitomir.ua/~fonin/projects/my2pg/my2pg_man.html

shortcut :
mysqldump -u username --password=mypasswd databasetodump [tables] 
|(pipe) my2pg.pl>dumpfile
dumpfile the script that you can use to create tables in an already 
existing PG-dbase. If you need functions in PG (e.g. you need enum in 
mysql) you have to read the file as PG-superuser and not as owner of the 
db. The my2pg.pl script creates Makefile and three libtypes.*. You need 
a specific pg-libary on your system, but i've forgotten the name. If you 
convert as superuser, don't forget to give the privs to the user (grant 
all on 'tablename' to 'user). do the same for *_seq-tables.
hope it helps
Gerd
-- 
--------------------------------------------------------
# Gerd Terlutter        | Mueller+Blanck Software GmbH #
# gerd@MplusB.de        | Gutenbergring 38             #
# gerd.terlutter@web.de | D-22848 Noderstedt           #
# tel:0171/6992579      | tel:+49 40 500 171-1         #
# Buero:040/500171-17   | fax:+49 40 500 171-71        #
--------------------------------------------------------

Attachments:

  my2pg.pl (application/x-perl, 25.1K) download

view thread (3+ messages)

Message-ID: <3F4DD331.4050502@MplusB.de>
Permalink:  ../3F4DD331.4050502@MplusB.de/
Also on:    postgresql.org/message-id/3F4DD331.4050502@MplusB.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: gerd@MplusB.de, suresh@ooty.tenet.res.in
  Subject: Re: mysql to pgsql
  In-Reply-To: <3F4DD331.4050502@MplusB.de>
  References: <3F4D87F2.980EA931@ooty.tenet.res.in> <3F4DD331.4050502@MplusB.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox