Hello,
I have no experience with Oracle or with triggers in general, but I've
been given several CREATE statements to base my Postgres schema on, but
I don't know how to translate the trigger statements. Here is an
example Oracle create:
CREATE OR REPLACE TRIGGER fgroup_gid_ai
BEFORE INSERT ON fgroup
FOR EACH ROW WHEN (new.gid IS NULL OR new.gid = 0)
BEGIN
SELECT fgroup_gid_sq.nextval INTO :new.gid FROM dual;
END;
While I kind of get the idea of what it is trying to do, I don't know
how to implement it in Postgres. fgroup_gid_sq is a sequence, but I have
no idea what dual is. Any advice would be appreciated.
Thanks,
Scott