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

Error in special names (columns, tables) #1567

Closed
mkgrgis opened this issue Dec 12, 2022 · 5 comments
Closed

Error in special names (columns, tables) #1567

mkgrgis opened this issue Dec 12, 2022 · 5 comments

Comments

@mkgrgis
Copy link

mkgrgis commented Dec 12, 2022

Oracle 12, UTF-8
Postgresql 14, UTF-8
ora2pg 23.2
PRESERVE_CASE 1

Oracle
A tables with special signs or/and with "." in names or names of column translated to PostgreSQL not correct.

CREATE TABLE "TECHEXPRO"."⚙ parametres" ("Id" int, "Class1.p0" number(9,3), "Class1.p1" number(9,3), "Class2.p0" number(9,3), "Class2.p1" number(9,3), "Class2.p3" number(9,3), "Class3.p0" number(9,3) )

For example "Class1.p0" have translated to "Class1"."p0". It seems haven't correct translated at all.

@darold
Copy link
Owner

darold commented Jun 28, 2023

Ora2Pg do not support dot in object name. This is something I have never encountered and might be very rare so I have not spend time on this until now and will not for the moment.

@mkgrgis
Copy link
Author

mkgrgis commented Jun 29, 2023

Thanks, @darold! Let's dot in names will be enhancement. If there is hard regular expressions, maybe https://www.debuggex.com can help you.

@darold
Copy link
Owner

darold commented Jun 29, 2023

@mkgrgis
Copy link
Author

mkgrgis commented Jun 29, 2023

Thanks @darold !

I am studying Perl (after JavaScript and C experience) and have some URLs of closed issues with problems with object names. Hence some "key lines" are visible for me. I think this will enough to draft, testing and PR to your mainstream. I am beginning from 7f74071 and e927080

Thanks for many years of developing of this usefully open source utility!

@darold
Copy link
Owner

darold commented Mar 7, 2024

Ora2Pg rename all columns with a dot in the name by replacing them with underscore. The new name is appended to the REPLACE_COLS configuration directive value.

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

No branches or pull requests

2 participants