postgresql7.1
select rel_constraint__new(
null,
'rel_constraint',
:constraint_name,
:rel_segment,
:rel_side,
:required_rel_segment,
null,
:creation_user,
:creation_ip
);
select viol.rel_id, acs_object__name(viol.party_id) as name
from rel_constraints_violated_one viol
where viol.constraint_id = :constraint_id
UNION ALL
select viol.rel_id, acs_object__name(viol.party_id) as name
from rel_constraints_violated_two viol
where viol.constraint_id = :constraint_id