Informix Error -47091: Cannot specify user as a default value with this column type.
Cause and resolution
Cannot specify user as a default value with this column type.
You cannot specify a default value that consists of the login name of the current user for a column that is not a CHAR, NCHAR, VARCHAR, or NVARCHAR data type. Change the column data type (if permitted), or specify a different default value.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-47091 fires in the interactive ALTER TABLE menu when USER is specified as a default
value on a column that isn't CHAR, NCHAR, VARCHAR, or NVARCHAR — per the official
guidance.
USERspecified as a default on an incompatible column type, per the official guidance — the direct, only cause.
Solutions / Resolution
- Change the column's data type to
CHAR/NCHAR/VARCHAR/NVARCHAR, if permitted, per the official guidance. - Or specify a different default value, per the official guidance.
Examples
N/A
No specific triggering statement is documented beyond this menu-driven default-value restriction.
Diagnostic Checks
- Check the column's data type, and either change it to a character type or choose a different default value.
Related Errors / Related Topics
- -47088 — "Cannot specify server or site as a default value with this column type."
A related default-value/type-mismatch error, for
SERVER/SITErather thanUSER. - -47092 — "Cannot specify user as a default value with this column length." A
related
USERdefault-value error, on the column being too short rather than the wrong type.
USER can only be a default value for CHAR/NCHAR/VARCHAR/NVARCHAR columns — change
the type or choose a different default.