Bug #68205 Error occured when migrate data from PostgreSQL 9.2.2
Submitted: 28 Jan 2013 15:17 Modified: 6 Sep 2013 22:44
Reporter: Xi Bai Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench: Migration Severity:S1 (Critical)
Version:5.2.45 OS:MacOS (10.6.8)
Assigned to: CPU Architecture:Any
Tags: migration, MySQL Workbench, Postgresql

[28 Jan 2013 15:17] Xi Bai
Description:
When I tried migrating data stored on PostgreSQL with the version 9.2.2 to MySQL, I got the following error at the step of "Reverse engineer selected schemata" for both 5.2.45 and 5.2.44 on Mac OS 10.6.8:

Starting...
Connect to source DBMS...
- Connecting...
Connecting to ...
Opening ODBC connection to DSN=LocalPostgreSQLDB...
Connected
Connect to source DBMS done
Reverse engineer selected schemata....
Reverse engineering public from cssmetaselector
- Reverse engineering catalog information
- Preparing...
- Gathered stats for public
Reverse engineering tables from public
- Retrieving table public.static...
Traceback (most recent call last):
File "/Applications/MySQLWorkbench.app/Contents/PlugIns/db_postgresql_re_grt.py", line 335, in reverseEngineer
return PostgresqlReverseEngineering.reverseEngineer(connection, catalog_name, schemata_list, context)
File "/Applications/MySQLWorkbench.app/Contents/PlugIns/db_generic_re_grt.py", line 257, in reverseEngineer
cls.reverseEngineerTables(connection, schema)
File "/Applications/MySQLWorkbench.app/Contents/PlugIns/db_generic_re_grt.py", line 393, in reverseEngineerTables
cls.reverseEngineerTableIndices(connection, table)
File "/Applications/MySQLWorkbench.app/Contents/PlugIns/db_postgresql_re_grt.py", line 114, in reverseEngineerTableIndices
index_rows = cls.execute_query(connection, all_indices_query).fetchall()
File "/Applications/MySQLWorkbench.app/Contents/PlugIns/db_generic_re_grt.py", line 56, in execute_query
return cls.get_connection(connection_object).cursor().execute(query, *args, **kwargs)
pyodbc.Error: ('ODBC data type 1111 is not supported. Cannot read column indkey.', 'HY000')

Traceback (most recent call last):
File "/Applications/MySQLWorkbench.app/Contents/Resources/libraries/workbench/wizard_progress_page_widget.py", line 191, in thread_work
self.func()
File "/Applications/MySQLWorkbench.app/Contents/PlugIns/migration_schema_selection.py", line 160, in task_reveng
self.main.plan.migrationSource.reverseEngineer()
File "/Applications/MySQLWorkbench.app/Contents/PlugIns/migration.py", line 332, in reverseEngineer
self.state.sourceCatalog = self._rev_eng_module.reverseEngineer(self.connection, self.selectedCatalogName, self.selectedSchemataNames, self.state.applicationData)
SystemError: Error("('ODBC data type 1111 is not supported. Cannot read column indkey.', 'HY000')"): error calling Python module function DbPostgresqlRE.reverseEngineer
ERROR: Reverse engineer selected schemata: Error("('ODBC data type 1111 is not supported. Cannot read column indkey.', 'HY000')"): error calling Python module function DbPostgresqlRE.reverseEngineer
Failed

////////////////////////////////////////////////

The SQL DDL code:

-- Database: cssmetaselector

-- DROP DATABASE cssmetaselector;

CREATE DATABASE cssmetaselector
  WITH OWNER = postgres
       ENCODING = 'UTF8'
       TABLESPACE = pg_default
       LC_COLLATE = 'C'
       LC_CTYPE = 'C'
       CONNECTION LIMIT = -1;

How to repeat:
Use MySQL Workbench 5.2.45 to migrate data from a PostgreSQL server of version 9.2.2 or 8.4 on Mac OS snow leopard.
[30 Jan 2013 14:43] Sergio Andres De La Cruz Rodriguez
Hi Xi:

Can you confirm that you can repeat this issues with *just* the portion of the SQL DDL code that you pasted in the report?
[1 Feb 2013 16:26] Xi Bai
Sorry but I cannot confirm that. I tried one database on 8.4 and another on 9.2.2 and neither of them can be migrated to MySQL with MySQL Workbench.
[12 Feb 2013 14:10] Xi Bai
Hi, 

I found there was a new release for the Mac OS X, 5.2.46, but when I tried it, the bug is still there with the same error message.
[8 Mar 2013 19:05] Marijn Geurts
This is happening in the Windows version as well. 

I'm importing from Postgres 8.3 (yes i know) and i'm getting the same error as Xi does when i'm using Mysql Workbench version 5.2.47. 

Just FYI.
[16 Apr 2013 16:10] dokan abdoul karim diarrassouba
I'm getting the same error as mentioned above when trying to migrate data from postgreSql 9.0 running on windows 64 bit. It will be great if someone can help, Thanks in advance ...
[5 Jul 2013 15:53] Sergio Andres De La Cruz Rodriguez
Can any of you provide a sample DDL script so we can reproduce this issue?
[7 Sep 2013 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".