Informix Error -9719: A routine and an aggregate cannot share the same name.
Cause and resolution
A routine and an aggregate cannot share the same name.
An attempt to create a routine (UDR) with the same name as an aggregate is illegal. Also, creating an aggregate with the same name as a routine is also invalid. A routine name may not also match a built-in aggregate name, like sum(), count(), or max().
Change the aggregate or the routine name that is causing the failure.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-9719 fires when a routine (UDR) is created with the same name as an aggregate, or vice versa — per the official guidance.
- A routine name colliding with an aggregate's name, per the official guidance — the first named cause.
- An aggregate name colliding with a routine's name, per the official
guidance — the second named cause; this includes built-in aggregates like
sum(),count(), ormax().
Solutions / Resolution
- Change the aggregate or the routine name causing the failure, per the official guidance.
Examples
A routine named after a built-in aggregate
CREATE FUNCTION count(a INT) RETURNING INT ...; -- -9719: count is a built-in aggregate
Corrected
CREATE FUNCTION my_count(a INT) RETURNING INT ...;
Diagnostic Checks
- Check the target name against both routines and aggregates (including built-ins) in the system catalog, and rename whichever is being created.
Related Errors / Related Topics
- -9710 — "Overloading of built-in functions is not allowed." A related name-collision restriction, against built-in functions rather than aggregates.
- -9400 — "User-defined aggregate
already exists." A related aggregate-naming error, on aggregate-to-aggregate collision rather than routine-to- aggregate.
A routine and an aggregate shared the same name — rename one of them.