While perusing SQL92 I realized that we are delivering the wrong SQLSTATE
Tom Lane <tgl@sss.pgh.pa.us>
While perusing SQL92 I realized that we are delivering the wrong SQLSTATE error code for string-too-long errors. It should be STRING_DATA_RIGHT_TRUNCATION not STRING_DATA_LENGTH_MISMATCH. The latter probably should only be applied to cases where a string must be exactly so many bits --- there are no cases at all where it applies to character strings, only bit strings.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/adt/varbit.c | modified | +3 −3 |
| src/backend/utils/adt/varchar.c | modified | +5 −5 |