Skip to content

Handling Case-Sensitive Column Names in Views #1904

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

newtora2pg
Copy link
Contributor

Problem:
When converting Oracle views using Ora2Pg, column names enclosed in double quotes ("") are not handled correctly.
This leads to:
Loss of case sensitivity.
Missing double quotes in column names.
Incorrect parsing of column names containing dots ("."), e.g., "Employee. ID".

Example:

Oracle Input:

CREATE OR REPLACE VIEW emp_view (
"Employee. ID",
"Employee First Name",
"Employee Last Name",
"Department. ID"
) AS
SELECT employee_id, first_name, last_name, department_id FROM employees;

Ora2Pg Output:

CREATE OR REPLACE VIEW emp_view (employee., employee, employee, department.) AS ...

Solution Implemented:
Updated export_views() to retain double-quoted column names.Used flattening logic to preserve case and special characters.
Added handling in read_trigger_from_file() to correctly parse quoted column names, especially those with dots (".").

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

Successfully merging this pull request may close these issues.

1 participant