Re: Any hope for more specific error message for "value too long..."?

From: Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Any hope for more specific error message for "value too long..."?
Date: 2018-02-17 09:00:46
Message-ID: CAD3a31Wki-VWezw6n6XYfc7gCTGmX3W+t22AzJc-vs4PHdMEsQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>
> I dug in the archives and came across a crude POC hack here:
>
> https://www.postgresql.org/message-id/21693.1478376334@sss.pgh.pa.us
>
> At the time I didn't want to pursue it further because of Andres'
> pending work on redoing expression execution, but that's landed now.
>
> regards, tom lane
>

For that matter, it's not totally
> clear what would constitute an improvement --- what do you wish it would
> show you, exactly?

It looks like that patch is about showing which value or where in the
statement the error is being caused. At least for my case, it would be
helpful to know which field is causing the error. And just guessing, but
maybe simpler? I'd be happy to see:

The error text was: ERROR *for field [field_name]*: value too long for
type character varying(10)

Cheers,
Ken

--
AGENCY Software
A Free Software data system
By and for non-profits
*http://agency-software.org/ <http://agency-software.org/>*
*https://demo.agency-software.org/client
<https://demo.agency-software.org/client>*
ken(dot)tanzer(at)agency-software(dot)org
(253) 245-3801

Subscribe to the mailing list
<agency-general-request(at)lists(dot)sourceforge(dot)net?body=subscribe> to
learn more about AGENCY or
follow the discussion.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message hmidi slim 2018-02-17 10:08:39 Join query
Previous Message Vitaliy Garnashevich 2018-02-17 06:19:31 Re: shared_buffers 8GB maximum