Re: Add column-name hint to log messages generated by inserts when varchars don't fit

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Add column-name hint to log messages generated by inserts when varchars don't fit
Дата
Msg-id CA+TgmoYLziwCnWeDzTTVTY3LQa595Pk3Q1Ux0CxCjXrkQQ3TzQ@mail.gmail.com
обсуждение исходный текст
Ответ на Add column-name hint to log messages generated by inserts when varchars don't fit  ("Stepan Rutz" <Stepan.Rutz@gmx.de>)
Список pgsql-hackers
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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Patch for ginCombineData
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Dependency between bgw_notify_pid and bgw_flags