Informix Error -25815: The expression defining the list of values for a fragment in list fragmentation must be a constant.
Cause and resolution
The expression defining the list of values for a fragment in list fragmentation must be a constant.
The expression defining the list of values for a fragment in list fragmentation must be a constant. For example, the following statement generates an error:
CREATE TABLE customer (cust_id INTEGER, cust_name CHAR(20), state CHAR(2)) FRAGMENT BY LIST (state) PARTITION p0 VALUES ("KS", "IL") IN dbs0, PARTITION p1 VALUES (name, "NR") IN dbs2;
One of the values in the list for fragment p1 is a column, which is not a constant.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-25815 fires when a LIST fragmentation VALUES (...) clause includes a non-constant
expression (such as a column reference) — per the official guidance.
- A
LISTVALUESentry that's a column reference rather than a constant, per the official guidance — the direct, only cause.
Solutions / Resolution
- Rewrite the
VALUESlist to use only constants, per the official guidance.
Examples
A column reference in the VALUES list
CREATE TABLE customer (cust_id INTEGER, cust_name CHAR(20), state CHAR(2))
FRAGMENT BY LIST(state)
PARTITION p0 VALUES ('KS', 'IL') IN dbs0,
PARTITION p1 VALUES (name, 'NR') IN dbs2;
-- -25815: name is a column, not a constant
Diagnostic Checks
- Check every
VALUESentry in theLISTfragmentation clause, and replace any column reference with a constant.
Related Errors / Related Topics
- -25808 — "The expression defining the upper limit of each fragment must be a
constant." The equivalent restriction for
RANGE/interval fragmentation instead ofLIST.
A LIST fragmentation VALUES entry referenced a column instead of a constant — rewrite it
as a constant.