While perusing SQL92 I realized that we are delivering the wrong SQLSTATE
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 2 Aug 2004 16:51:10 +0000 (16:51 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 2 Aug 2004 16:51:10 +0000 (16:51 +0000)
commitd5299891498df311a0f7b1584a9ba16be2a927c1
tree09176ab04aaa0083f7d5fa185eecc2250e4156a6
parent630bfcd10c279cdcce22ea8fb4c046e4555cb268
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.
src/backend/utils/adt/varbit.c
src/backend/utils/adt/varchar.c