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
991 stars 342 forks source link

"Permission denied in schema public" with Postgres 15 #1624

Closed mariuskh closed 1 year ago

mariuskh commented 1 year ago

Hi!

After Postgres 15 removed the default create permission on the public schema, we see this Permission denied error when running ora2pg with --type test.

We get the error in the section TEST SEQUENCE VALUES because of the helper function: https://github.com/darold/ora2pg/blob/3589786735878fc5cbc98be2e98cf123c4c2fb60/lib/Ora2Pg.pm#L18306

Could this be changed so that if PG_SCHEMA is set, the function is placed in $self->{pg_schema}?

mgerhardy commented 1 year ago

Is this issue fixed by your commit https://github.com/sparebank1utvikling/ora2pg/commit/5b9d9ae95d450f404d72a9266477521f6d0b28c8 ?

darold commented 1 year ago

This is not my commit, not my repository and I don't think I have received any PR for that. Use it at your own risk.

I just pushed commit 1fb76b0 that might fixes this issue.