Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STOP_ON_ERROR is ignored for direct data copy indexes re-creation #1646

Closed
pavel-moskotin-db opened this issue Jun 20, 2023 · 1 comment
Closed

Comments

@pavel-moskotin-db
Copy link

For ora2pg:23.2 in the following scenario structures and data are being migrated successfully:

STOP_ON_ERROR 0
LOG_ON_ERROR 1
DROP_INDEXES 1

However indexes re-creation interrupts in case of unsupported function:
[2023-06-17 08:29:30] Restoring foreign keys of table <table_name>...
[2023-06-17 08:29:33] Restoring indexes of table <table_name>...
DBD::Pg::db do failed: ERROR: function trunc(timestamp without time zone) does not exist
LINE 1: CREATE INDEX <index_name> ON <table_name> ((trunc(cast(sn...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts. at /usr/local/share/perl5/Ora2Pg.pm line 8702.
[2023-06-17 08:32:51] FATAL: ERROR: function trunc(timestamp without time zone) does not exist
LINE 1: CREATE INDEX <index_name> ON <table_name> ((trunc(cast(sn...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts., SQL: CREATE INDEX <index_name> ON <table_name> ((trunc(cast(<field_name> as timestamp))));
Aborting export...

Thus multiple "good" indexes are not being created after first one fails.

Is it possible to add native support for Oracle:trunc => PG:date_trunc function?
If not, is it possible to honour "STOP_ON_ERROR 0" while re-creating the indexes?

@darold
Copy link
Owner

darold commented Sep 5, 2023

Normally now Ora2Pg always convert Oracle trunc() function to date_trunc(), alternatively you can also use orafce that adds the trunc() function for dates.

@darold darold closed this as completed Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants