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

Double quote $col when reserved keyword #1678 #1679

Closed leonteq-reisg closed 10 months ago

leonteq-reisg commented 11 months ago

When generating the statement 'ALTER TABLE $table ALTER COLUMN $col SET NOT NULL', $col should be double quoted if it's a reserved keyword

darold commented 10 months ago

This is better addressed with commit 22210c5. Actually, there is a dedicated function used to double quote identifier named quote_object_name() that cover all cases. Close #1679