darold / ora2pg

Ora2Pg is a free tool used to migrate an Oracle database to a PostgreSQL compatible schema. It connects your Oracle database, scan it automatically and extracts its structure or data, it then generates SQL scripts that you can load into PostgreSQL.
http://www.ora2pg.com/
GNU General Public License v3.0
978 stars 341 forks source link

Wrong argument "extra_param OPAQUE" in function with OUT arguments (regression in release 24.3) #1786

Closed edelanoe closed 4 weeks ago

edelanoe commented 1 month ago

Hello Darold,

I still use your -great- tool on a regular basis...

When I tried release 24.3, I saw a new way of translating procedures with OUT or "IN OUT" arguments: an extra argument is added and the generated function retuens record:
The problematic added string is : ", OUT extra_param OPAQUE) RETURNS record "

This makes my PostgreSQL 15 server complain with "ERROR: type opaque does not exist".

I attach a small probe package zip with 3 files: Oracle, migrated with ora2pg 23.1 and migrated with ora2pg 24.3.

Is this addition required ?

Best Regards, Eric PCK_PROBE-20240530.zip

darold commented 1 month ago

Hi Eric,

You have to set PG_VERSION to 15 in your ora2pg.conf. I guess it is set to a PG version <= 10