PostgreSQL Database Conversion Tool

The PostgreSQL database conversion tool contained within RazorSQL allows users to convert PostgreSQL tables to and create PostgreSQL tables from the following database types:

  • DB2
  • HSQLDB
  • MS Access
  • MS SQL Server
  • MySQL
  • Oracle
  • SQLite

RazorSQL contains conversion tools to convert one or many tables at a time. When converting tables, the tool looks at the type of database the table is being converted to, and generates the database specific DDL to generate the table. It looks at the source database column types and does any adjustments necessary to convert those column types to the destination database's format. The tool then generates and executes the insert statements necessary to populate the table data on the destination database.

The following is an example of the DDL for a MySQL table:

CREATE TABLE sample.stateprovince ( StateProvinceID int(10) NOT NULL auto_increment, StateProvinceCode char(3) NOT NULL, CountryRegionCode varchar(3) NOT NULL, IsOnlyStateProvinceFlag smallint(5) NOT NULL, Name varchar(50) NOT NULL, TerritoryID int(10) NOT NULL, rowguid varchar(250) NOT NULL, ModifiedDate datetime NOT NULL, PRIMARY KEY (StateProvinceID) )

When converting the above MySQL table from MySQL to PostgreSQL, the conversion tool generates the following PostgreSQL DDL corresponding to the above MySQL DDL:

CREATE TABLE stateprovince ( StateProvinceID int NOT NULL, StateProvinceCode char(3) NOT NULL, CountryRegionCode varchar(3) NOT NULL, IsOnlyStateProvinceFlag int NOT NULL, Name varchar(50) NOT NULL, TerritoryID int NOT NULL, rowguid varchar(250) NOT NULL, ModifiedDate timestamp NOT NULL, PRIMARY KEY (StateProvinceID) )

PostgreSQL Database Conversion Tool