On Wed, Aug 5, 2015 at 6:39 AM, Stepan Rutz <Stepan.Rutz@gmx.de> wrote:
> on our production servers I have quite some errors due to excessively long varchar-values which application-code
triesto insert into tables and which don't fit.
> The errors look like
>
> ERROR: value too long for type character varying(4)
>
> This is not helping me much. The patch will turn this too
>
> ERROR: value too long for type character varying(4) (hint: column-name is mycolumn)
>
> if the column that was overflown was mycolumn.
expression_tree_walker is used in enough different places that you
can't really modify that like this. It'll have too many side effects
that may not be good.
Generally, the way to stick some useful information into the error
message is with an error context callback, rather than by appending to
the primary error message.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company