pg2mysql icon indicating copy to clipboard operation
pg2mysql copied to clipboard

Script to convert Postgres dump files to MySQL dump files

Results 9 pg2mysql issues
Sort by recently updated
recently updated
newest added

In our dump, a column is called `interval_length` and is renamed to the (invalid) column name `varchar(64)_length` because of [line 228 in the pg2mysql.pl](https://github.com/dolthub/pg2mysql/blob/main/pg2mysql.pl#L228) script

We want to translate PostgreSQL dump into MySQL (for MariaDB ultimatively) and from a ~2GB dump we saw that some researchers use the Postgres [LIKE operator](https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-LIKE) as `~~` and NOT...

On some datetime values that are exported we have the following error: ``` ERROR 1292 (22007) at line 677: Incorrect datetime value: '2022-01-31 16:18:56+01' ``` Right now we are using...

I'm not sure what these should be converted to, but internal isn't a valid type in mysql ``` $ cat test.pgsql CREATE TABLE public.dcim_device ( id uuid NOT NULL, created...

Likely field name serial is being treated as if it's a serial type https://github.com/dolthub/pg2mysql/blob/main/pg2mysql.pl#L167 ``` $ cat test.pgsql CREATE TABLE public.dcim_device ( id uuid NOT NULL, created date, serial character...

Since in Postgres a database contains one or more named schemas and in MySQL schema=database, when converting from Postgres, add an option to set the database name for MySQL. In...

It's possible we could just convert these to JSON types. Seems like similar syntax.

In Postgres these generate a create type statement. It's not too hard to store these and then insert them when we notice a type we don't recognize.

The approach currently in this script is to process dumps line by line switching between cases when a new SQL statement is matched. For instance, we handle a CREATE TABLE...