Add column name to error message?

From: Edson Richter <edsonrichter(at)hotmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Add column name to error message?
Date: 2014-03-18 19:22:26
Message-ID: BLU0-SMTP248EBEB9DE2CF9206D99275CF7C0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi!

I would like to have a improved error message with column name. Today
(9.2.3), I receive the following error:

"ERROR: value too long for type character varying(20)"

Why not this more intuitive error message:

"ERROR: value too long for type character varying(20) at column XYZ"

Since my table can have more than one "character varying(20)" inside,
would be useful to know which one has throw the error...
Is there any reasoning (security, perhaps) for hiding column name in the
error?

Thanks,
--

*Edson Carlos Ericksson Richter*
/Sistemas para Bibliotecas, Escolinhas Infantis
Projetos sob medida para sua empresa/
Celular: (51) 9318-9766
(51) 8585-0796
/"A mente que se abre a uma nova ideia jamais voltará ao seu tamanho
original"/
- Albert Einstein

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Edson Richter 2014-03-18 20:22:55 Re: Add column name to error message?
Previous Message Joe Conway 2014-03-18 17:19:24 Re: Optimizing CartoDB's JenksBins function