pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Importing table from mysql
3+ messages / 3 participants
[nested] [flat]

* Importing table from mysql
@ 2000-06-02 05:47 Pragati Sagar <pragatis@sapientinfotech.com>
  2000-06-02 15:31 ` Re: Importing table from mysql Anthony E. Greene <agreene@pobox.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Pragati Sagar @ 2000-06-02 05:47 UTC (permalink / raw)
  To: pgsql-admin

Hi!
I already have  a database created in mysql. But now I want to shift from
mysql to postgresql but my problem is how to convert mysql database to
postgresql. How will I import the tables from mysql? Please help me with
this as I have not been able to find any diocumentaion on the net.

Thanks
Anupam




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Importing table from mysql
  2000-06-02 05:47 Importing table from mysql Pragati Sagar <pragatis@sapientinfotech.com>
@ 2000-06-02 15:31 ` Anthony E. Greene <agreene@pobox.com>
  2000-06-12 08:05   ` Re: Importing table from mysql Dirk Heinrichs <heini@chaos.tng.oche.de>
  0 siblings, 1 reply; 3+ messages in thread

From: Anthony E. Greene @ 2000-06-02 15:31 UTC (permalink / raw)
  To: pgsql-admin

At 11:17 2000-06-02 +0530, Pragati Sagar wrote:
>I already have  a database created in mysql. But now I want to shift from
>mysql to postgresql but my problem is how to convert mysql database to
>postgresql. How will I import the tables from mysql? Please help me with
>this as I have not been able to find any diocumentaion on the net.

Does mysql have a command analogous to pg_dump? If you could get all the
data out and include the SQL commands it takes to recreate the database,
that would be best.

Alternatively, you export the data into tab or comma-delimited text files
and use the \copy command in psql to import it into existing tables.


 Tony
 --
 Anthony E. Greene <agreene@pobox.com>
 PGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26  C484 A42A 60DD 6C94 239D
 Linux: The choice of a GNU Generation.



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Importing table from mysql
  2000-06-02 05:47 Importing table from mysql Pragati Sagar <pragatis@sapientinfotech.com>
  2000-06-02 15:31 ` Re: Importing table from mysql Anthony E. Greene <agreene@pobox.com>
@ 2000-06-12 08:05   ` Dirk Heinrichs <heini@chaos.tng.oche.de>
  0 siblings, 0 replies; 3+ messages in thread

From: Dirk Heinrichs @ 2000-06-12 08:05 UTC (permalink / raw)
  To: pgsql-admin

On Fre, 02 Jun 2000, Anthony E. Greene wrote:
>At 11:17 2000-06-02 +0530, Pragati Sagar wrote:
>>I already have  a database created in mysql. But now I want to shift from
>>mysql to postgresql but my problem is how to convert mysql database to
>>postgresql. How will I import the tables from mysql? Please help me with
>>this as I have not been able to find any diocumentaion on the net.
>
>Does mysql have a command analogous to pg_dump? If you could get all the
>data out and include the SQL commands it takes to recreate the database,
>that would be best.
>
>Alternatively, you export the data into tab or comma-delimited text files
>and use the \copy command in psql to import it into existing tables.

You could also write a perl script, that fetches the data from the mysql db
and inserts it into the psql db using DBI.

Bye...

	Dirk



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2000-06-12 08:05 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-06-02 05:47 Importing table from mysql Pragati Sagar <pragatis@sapientinfotech.com>
2000-06-02 15:31 ` Anthony E. Greene <agreene@pobox.com>
2000-06-12 08:05   ` Dirk Heinrichs <heini@chaos.tng.oche.de>

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