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

Package/Schema is missing in search_path #1688

Closed janopha closed 10 months ago

janopha commented 10 months ago

We have a Problem with the search_path in the SQL files of a Package export. The Config FILE_PER_FUNCTION is enabled. We have a directory with the name of the package that was exported by ora2pg. The SQL Files inside this directory have a search_path configured.

But the search_path only contains the schema that was exported and the public schema. Not the package, which is a schema after the ora2pg export.

The Import shows "does not exist" errors for some types, because the schema (name of the package) is not configured in the search_path. The types the SQL File want to access are present in the schema/package.

The Problem is, that ora2pg don't add the package/schema to the search_paths of the SQL Files inside the directory of the package.

darold commented 10 months ago

Commit 4ad09fc might fix this issue.