Closed carenswijaya01 closed 4 months ago
Another clue, i found it bug because i use referencing clause on oracle's trigger
Please can you past an example of an Oracle trigger DDL that is failing? You can remove the body of the trigger (between the begin and final end).
Please can you past an example of an Oracle trigger DDL that is failing? You can remove the body of the trigger (between the begin and final end).
Here my oracle trig
CREATE OR REPLACE TRIGGER SM.TRG_ABSENSI_ONLINE
BEFORE INSERT
ON SM.ABSENSI_ONLINE
REFERENCING NEW AS New OLD AS Old
FOR EACH ROW
DECLARE
tmpVar NUMBER;
BEGIN
....
END TRG_ABSENSI_ONLINE;
And the result on ora2pg
DROP TRIGGER IF EXISTS trg_absensi_online ON absensi_online CASCADE;
CREATE OR REPLACE FUNCTION trigger_fct_trg_absensi_online() RETURNS trigger AS $BODY$
DECLARE
tmpVar bigint;
BEGIN
....
RETURN NEW;
END
$BODY$
LANGUAGE 'plpgsql' SECURITY DEFINER;
-- REVOKE ALL ON FUNCTION trigger_fct_trg_absensi_online() FROM PUBLIC;
CREATE TRIGGER trg_absensi_online
BEFORE INSERT ON absensi_online TRG_ABSENSI_ONLINE
BEFORE INSERT
ON SM.ABSENSI_ONLINE
REFERENCING NEW AS New OLD AS Old
FOR EACH ROW
FOR EACH ROW
EXECUTE PROCEDURE trigger_fct_trg_absensi_online();
It happens only if i use referencing clause, even if i comment that referencing clause, it still duplicate like above, except i remove that clause
Commit fb6b0ad fixes this issue.
Commit fb6b0ad fixes this issue.
It still have bug in BEFORE INSERT, not just in FOR EACH ROW
Hi, i have an issue with ora2pg 24.1.
here's my ora2pg.conf
and some of sql trigger result become like this
not all of it, but most of it become like that