dimitri / pgloader

Migrate to PostgreSQL in a single command!

Home Page:http://pgloader.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Postgres - pgloader - Column names are converted to lower case in PostgreSQL by default

Gokuljokul opened this issue · comments

I have inherited a large MySQL database and want to move data to postgresql db. In this case when I run below command to dump data from MySQL, facing the issue that column names are converted to lower case in PostgreSQL by default., But expected is PostgreSQL to keep column names in upper or mixed case what exactly from MySQL db.

pgloader mysql://root:password@$localhost/accessdatabase postgresql://postgres:password@postgres/accessdatabase
Having an issue with column names being converted to lower case during migration from MySQL to Postgres.

Is there a query I can run migrate what same as MySQL db to postgresql db?

Using --with "quote identifiers" option, that instructs pgloader to quote all identifiers, thus preserving their original case from MySQL.

pgloader mysql://root:password@localhost/accessdatabase \ postgresql://postgres:password@postgres/accessdatabase \ --with "quote identifiers"