While perusing SQL92 I realized that we are delivering the wrong SQLSTATE

Tom Lane <tgl@sss.pgh.pa.us>

Commit: d5299891498df311a0f7b1584a9ba16be2a927c1
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2004-08-02T16:51:10Z
Releases: 8.0.0
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

PathChange+/−
src/backend/utils/adt/varbit.c modified +3 −3
src/backend/utils/adt/varchar.c modified +5 −5