01004 — string_data_right_truncation
01004 — string_data_right_truncation
At a glance
01004 names right truncation reported as a warning condition. No resolved 18.6 core/contrib report group was found, so this page does not assign a particular cast, encoding path, client, or message.
| Field | Value |
|---|---|
| SQLSTATE | 01004 |
| Condition | string_data_right_truncation |
| Status | active |
| Known present by | 7.4 |
| Locked snapshots | 9.0.23, 9.1.24, 9.2.24, 9.3.25, 9.4.26, 9.5.25, 9.6.24, 10.23, 11.22, 12.22, 13.23, 14.24, 15.19, 16.15, 17.11, 18.6, 19beta3 |
| Macros | ERRCODE_WARNING_STRING_DATA_RIGHT_TRUNCATION |
| Aliases | — |
Meaning
The definition names right truncation as a warning condition. Without a resolved call group, the accepted truncation behavior, data preservation, and producer remain unknown.
Messages and diagnostics
No resolved 18.6 message variant was found. Preserve the exact value/column context, declared and received lengths when available, encoding, producer version, and complete diagnostics.
Diagnosis
Locate the source that emitted the code and compare its length and encoding rules with the value being transferred. Distinguish a warning that preserves a truncated value from an error that rejects the statement; the SQLSTATE alone does not decide that behavior.
Response
Use the producer’s supported length or encoding adjustment and verify whether data was intentionally truncated. Do not silently retry the same input when information may already have been lost.
Versions
01004 is present from the locked 9.0.23 snapshot through 18.6 and 19 Beta 3, with known_present_by 7.4. The available evidence establishes catalogue presence, not a current core emission path.
Related
01003 concerns null elimination; 01008 concerns zero-bit padding; 22001 is a separate error-category string truncation condition.
Sources
errcodes.txt— definition, SHA-2566e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba.- Structured evidence — fixed sources, message groups, and runtime boundary.