Queries for PostgreSQL DDL convert

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Queries for PostgreSQL DDL convert

杨逸存
Dear hacker:
    I am a student from Nanjing University. I have some troubles about DDL statement convertion. I have several MySQL DDL statements from MySQL dump command. Now I wanna convert the statements' grammar so that they can be supported by PostgreSQL. However I have tried the tool - 'SQL Data Definition Language (DDL) Conversion to MySQL, PostgreSQL and MS-SQL' on the wiki website of pgsql but it seems to have some bugs and it cannot convert contents of my .sql files. So is there any tools avaliable for me to accomplish it?
    The mail's attachment is an example I wanna convert. Looking forward to your reply.
    Yours sincerely.

broadleaf.base.schema.sql (215K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Queries for PostgreSQL DDL convert

Julien Rouhaud
On Wed, Mar 10, 2021 at 04:09:49PM +0800, 杨逸存 wrote:
> Dear hacker:
>     I am a student from Nanjing University. I have some troubles about DDL statement convertion. I have several MySQL DDL statements from MySQL dump command. Now I wanna convert the statements' grammar so that they can be supported by PostgreSQL. However I have tried the tool - 'SQL Data Definition Language (DDL) Conversion to MySQL, PostgreSQL and MS-SQL' on the wiki website of pgsql but it seems to have some bugs and it cannot convert contents of my .sql files. So is there any tools avaliable for me to accomplish it?
>     The mail's attachment is an example I wanna convert. Looking forward to your reply.

Ora2pg (http://ora2pg.darold.net/documentation.html) supports migration from
mysql to postgres.  It should be able to take care of the DDL conversion for
you.