Giter Club home page Giter Club logo

Comments (5)

carenswijaya01 avatar carenswijaya01 commented on August 18, 2024

Another clue, i found it bug because i use referencing clause on oracle's trigger

from ora2pg.

darold avatar darold commented on August 18, 2024

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).

from ora2pg.

carenswijaya01 avatar carenswijaya01 commented on August 18, 2024

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

from ora2pg.

darold avatar darold commented on August 18, 2024

Commit fb6b0ad fixes this issue.

from ora2pg.

carenswijaya01 avatar carenswijaya01 commented on August 18, 2024

Commit fb6b0ad fixes this issue.

It still have bug in BEFORE INSERT, not just in FOR EACH ROW

from ora2pg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.