Informix Error -9912: Constraints on collection type column not allowed.
Cause and resolution
Constraints on collection type column not allowed.
Constraint expressions are not supported in the definition of a column of a collection type. Remove the constraint clause.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-9912 fires when a collection-type column's definition includes a constraint expression — per the official guidance.
- A constraint expression specified for a collection-type column, per the official guidance — the direct, only cause; constraints aren't supported on collection columns.
Solutions / Resolution
- Remove the constraint clause, per the official guidance.
Examples
A constraint on a collection column
CREATE TABLE tab (id INT, items LIST(INT NOT NULL) CHECK (CARDINALITY(items) > 0));
-- -9912
Corrected
CREATE TABLE tab (id INT, items LIST(INT NOT NULL));
Diagnostic Checks
- Check collection-type column definitions for a CHECK or other constraint clause, and remove it.
Related Errors / Related Topics
- -9911 — "Defaults on collection type column not allowed." The same class of collection-column-definition restriction, on defaults rather than constraints.
A collection-type column had a constraint clause, which isn't supported — remove it.