Informix Error -948
-948 Cannot rename constraint index.
User tried to rename a system-generated constraint index.
You do not need to take any action because you are not allowed to rename a system-generated constraint index.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-948 fires when RENAME INDEX (or an equivalent) targets a system-generated index backing a
constraint (such as the index automatically created for a PRIMARY KEY/UNIQUE constraint) —
per the official guidance, this simply isn't allowed, and per the official guidance's own
framing, no action is needed since there's no legitimate reason to rename it.
RENAME INDEXtargeting a system-generated constraint index, per the official guidance — the direct, only cause.- A misunderstanding that a constraint's backing index can be renamed independently of the constraint itself, when it's managed automatically as part of the constraint.
Solutions / Resolution
- No action needed, per the official guidance — renaming a system-generated constraint index isn't permitted under any circumstances, so there's no workaround to apply.
- If a specific index name was actually the goal, name the constraint itself explicitly when creating it, since a named constraint's backing index typically takes on a name derived from (or configurable via) the constraint definition, rather than trying to rename the index after the fact.
Examples
The disallowed attempt
RENAME INDEX orders_pkey_idx TO orders_id_idx;
-- -948: orders_pkey_idx is a system-generated constraint index
Diagnostic Checks
- Confirm whether the index being renamed backs a constraint (query
sysconstraintsfor anidxnamematching the index) before attempting the rename.
Related Errors / Related Topics
- -584 — "Cannot rename system catalog." A related renaming restriction, for
sys*catalog tables rather than constraint indexes. - -585 — "Cannot rename column in system catalog." Same family, for catalog columns.
No workaround exists — a constraint's backing index can't be renamed; name the constraint itself appropriately when creating it instead.