dalibo / sqlserver2pgsql

Migration tool to convert a Microsoft SQL Server Database into a PostgreSQL database, as automatically as possible
http://dalibo.github.io/sqlserver2pgsql
GNU General Public License v3.0
515 stars 117 forks source link

Cannot determine the PostgreSQL's datatype corresponding to public.Name. This is a bug #111

Closed yasinyazici34 closed 4 years ago

yasinyazici34 commented 5 years ago

Hi When I run following command I got an error. perl sqlserver2pgsql.pl -f adventure_work_tables.sql -b tables-before.sql -a tables-after.sql -u tables-unsure.sql

Cannot determine the PostgreSQL's datatype corresponding to public.Name. This is a bug at sqlserver2pgsql.pl line 319 main::convert_type('public.Name', undef, 'Name', 'Department', undef, 'HumanResources') called at sqlserver2pgsql.pl line 1321 main::add_column_to_table('HumanResources', 'Department', 'Name', 'dbo', 'Name', undef, undef, 'NOT NULL') called at sqlserver2pgsql.pl line 1445 main::parse_dump() called at sqlserver2pgsql.pl line 3103

ıs there anyone who faced with this error.

madtibo commented 5 years ago

Hello @yasinyazici34

sqlserver2pgsql does not work for adventure work sample database. Here, the type for the column is public.Name. This is a custom type that is not defined, hence it cannot be transform to a PostgreSQL data type.

Cordialement,

bluvie commented 5 years ago

Hello Madtibo,

As you mentioned "sqlserver2pgsql does not work for adventure work sample database. Here, the type for the column is public.Name. This is a custom type that is not defined, hence it cannot be transform to a PostgreSQL data type."

Is there any other way to do ? so that i can convert it to PSG?

Or do i have to change anything in the script file "sqlserver2pgsql" so that i can move on with it?

ertemmstein commented 5 years ago

As a workaround you can change custom type to known type. Run the script , then change it manually on postgre

madtibo commented 5 years ago

@ertemmstein Thank you for your proposal!

@bluvie @yasinyazici34 Does the @ertemmstein answer solve your problem?

madtibo commented 4 years ago

Guess it worked.

Closing the issue.