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
1.02k stars 343 forks source link

Oracle triggers issue #1585

Closed tayalarun1 closed 1 year ago

tayalarun1 commented 1 year ago

Hello Darold,

I have a trigger in Oracle which gets migrated to PostgreSQL via Ora2pg v23.2 as below:

Migrated code

CREATE TRIGGER update_lotqty
    AFTER INSERT OR UPDATE  OR DELETE OF qty ON mms_lotitem FOR EACH ROW
    EXECUTE PROCEDURE trigger_fct_update_lotqty();

Migration should be like this

CREATE TRIGGER update_lotqty
    AFTER INSERT OR DELETE OR UPDATE OF qty ON mms_lotitem FOR EACH ROW
    EXECUTE PROCEDURE trigger_fct_update_lotqty();

Update are on columns and delete are not on columns. Hence it should be "update of" instead of "delete of"

If you can incorporate the change in next release, would be helpful.

Thanks Arun

darold commented 1 year ago

Commit d03a1fa fixes this issue.