Informix Error -651
-651 Reserved column size > maximum column size (varchar).
This statement specifies a VARCHAR(m, r) column with a reserved width r that is greater than the maximum width m. Check the punctuation of the column definition. If it is as you intended, revise the statement so that m is greater than or equal to r.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-651 fires when a VARCHAR(m, r) column definition's reserved width r is greater than its
maximum width m — per the official guidance, the reserved size (the space pre-allocated in the
row) can't exceed the column's actual maximum size.
- The two numbers in
VARCHAR(m, r)transposed or mistyped, per the official guidance's suggested first check —rending up larger thanmby mistake. - A genuine attempt to reserve more space than the column's maximum, misunderstanding what the reserved-size parameter does — it pre-allocates space within the maximum, not beyond it.
Solutions / Resolution
- Check the punctuation of the column definition, per the official guidance, for a transposed or mistyped number.
- Revise the statement so
mis greater than or equal tor, per the official guidance — the maximum width must be at least as large as the reserved width.
Examples
The disallowed combination
CREATE TABLE orders (order_id INT, notes VARCHAR(50, 100));
-- -651: reserved size 100 exceeds maximum size 50
Corrected
CREATE TABLE orders (order_id INT, notes VARCHAR(100, 50));
Diagnostic Checks
- Compare the two numbers in the
VARCHAR(m, r)definition directly, confirmingm >= r.
Related Errors / Related Topics
- -650 — "Maximum varchar size has been exceeded." A related
VARCHAR-definition error, about the maximum width itself exceeding 255, rather than the reserved width exceeding the maximum.
A straightforward numeric-order check — confirm the maximum width (m) is at least as large as
the reserved width (r).