Informix Error -734
-734 Object name matches old or new values correlation name.
This error is returned in three cases:
* The name of the triggering table or the synonym, if it is used, matches the old or new correlation name in the REFERENCING clause.
* The name of a table or a synonym that is referenced in the action clause matches either the old or new correlation name in the REFERENCING clause.
* The old correlation name matches the new correlation name.
Change either the correlation name or the table name, and execute the CREATE TRIGGER statement again.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-734 fires in three related naming-collision situations, per the official guidance: the
triggering table (or a synonym for it) has the same name as the OLD/NEW correlation name in
the REFERENCING clause; a table or synonym referenced in the triggered action matches either
correlation name; or the OLD correlation name matches the NEW correlation name.
- The triggering table's name coinciding with the chosen correlation name, per the official
guidance — for example,
REFERENCING NEW AS orderson a trigger for theorderstable itself. - A table/synonym referenced within the triggered action sharing a name with a correlation name, per the official guidance — an unrelated naming collision inside the action clause.
OLDandNEWgiven the same correlation name, per the official guidance — the two must be distinguishable.
Solutions / Resolution
- Change either the correlation name or the table name, per the official guidance's
documented resolution, and resubmit the
CREATE TRIGGERstatement. - Pick correlation names clearly distinct from any table/synonym name involved, as a general
practice to avoid this collision — conventional short prefixes like
pre/post(as used elsewhere in this reference) avoid the problem entirely. - Give
OLDandNEWdifferent correlation names, if they were accidentally set to the same one.
Examples
A correlation name matching the triggering table
CREATE TRIGGER trg_orders_update UPDATE OF status ON orders
REFERENCING NEW AS orders FOR EACH ROW
(EXECUTE PROCEDURE log_status_change(orders.status));
-- -734: 'orders' collides with the triggering table's own name
Corrected
CREATE TRIGGER trg_orders_update UPDATE OF status ON orders
REFERENCING NEW AS post FOR EACH ROW
(EXECUTE PROCEDURE log_status_change(post.status));
Diagnostic Checks
- Compare the chosen
OLD/NEWcorrelation names against the triggering table's name, any synonym for it, and any table/synonym referenced in the triggered action, and against each other.
Related Errors / Related Topics
- -732 — "Incorrect use of old or new values correlation name inside trigger." A related
REFERENCINGrestriction, about how the correlation name is used rather than a naming collision.
Pick correlation names clearly distinct from any table/synonym name involved, and from each other — the official guidance's own fix is simply to rename one side of the collision.