Informix Error -25808: The expression defining the upper limit of each fragment must be a constant.
Cause and resolution
The expression defining the upper limit of each fragment must be a constant.
The fragment expression for interval fragmentation is of the form VALUES < <upper_limit_expr>. The expression for the upper limit must be a constant. For example, the following statement generates an error:
CREATE TABLE employee (emp_id INTEGER, emp_name CHAR(64), ssn CHAR(12), basepay FLOAT, varpay FLOAT, dept_id SMALLINT) FRAGMENT BY RANGE(emp_id) INTERVAL(2000) STORE IN (dbs1, dbs2, dbs3) PARTITION p1 VALUES < emp_id+1 IN dbs3;
The upper limit of fragment p1 is a column expression, emp_id+1, which is not a constant.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-25808 fires when a VALUES < <upper_limit_expr> fragment definition's upper-limit
expression isn't a constant — per the official guidance.
- An upper-limit expression referencing a column rather than a constant, per the official guidance — the direct, only cause.
Solutions / Resolution
- Rewrite the upper limit as a constant, per the official guidance.
Examples
A column-referencing upper limit
CREATE TABLE employee (emp_id INTEGER, emp_name CHAR(64), ssn CHAR(12),
basepay FLOAT, varpay FLOAT, dept_id SMALLINT)
FRAGMENT BY RANGE(emp_id) INTERVAL(2000) STORE IN (dbs1, dbs2, dbs3)
PARTITION p1 VALUES < emp_id+1 IN dbs3;
-- -25808: emp_id+1 is a column expression, not a constant
Diagnostic Checks
- Check every fragment's upper-limit expression, and rewrite any column reference as a constant.
Related Errors / Related Topics
- -25807 — "The fragment key for interval fragmentation must be a single column expression." A related interval-fragmentation syntax restriction.
- -25815 — "The expression defining the list of values for a fragment in list
fragmentation must be a constant." The equivalent restriction for
LISTfragmentation instead ofRANGE/interval.
A fragment's upper-limit expression referenced a column instead of a constant — rewrite it as a constant.