pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ken Tanzer <ken.tanzer@gmail.com>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: PG-General Mailing List <pgsql-general@postgresql.org>
Subject: Re: Any hope for more specific error message for "value too long..."?
Date: Sat, 17 Feb 2018 11:26:12 -0500
Message-ID: <20105.1518884772@sss.pgh.pa.us> (raw)
In-Reply-To: <CAD3a31Wki-VWezw6n6XYfc7gCTGmX3W+t22AzJc-vs4PHdMEsQ@mail.gmail.com>
References: <CAD3a31WR8X1TpjR_MoZxuz4S0BO3ZkPAeLoQ9rPxKHG=728eoQ@mail.gmail.com>
	<CAKFQuwZzkC3Z+sypWAaa6JUht5wKh7tjX-Kc2mRBSm8_1H-RCg@mail.gmail.com>
	<5614.1518831408@sss.pgh.pa.us>
	<CAD3a31Wki-VWezw6n6XYfc7gCTGmX3W+t22AzJc-vs4PHdMEsQ@mail.gmail.com>

Ken Tanzer <ken.tanzer@gmail.com> writes:
>>> 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
>> 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?

No; read the rest of that thread.  It would actually be nigh impossible to
do it that way in the current system, except for a small subset of cases.
Furthermore, if we did do it like that, what about similar errors in
non-INSERT commands?  The error cursor approach at least has the advantage
of being pretty generically applicable.  In principle we could make it
work for any error arising during expression evaluation.

			regards, tom lane




view thread (7+ messages)

Message-ID: <20105.1518884772@sss.pgh.pa.us>
Permalink:  ../20105.1518884772@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20105.1518884772@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, ken.tanzer@gmail.com, david.g.johnston@gmail.com
  Subject: Re: Any hope for more specific error message for "value too long..."?
  In-Reply-To: <20105.1518884772@sss.pgh.pa.us>
  References: <CAD3a31WR8X1TpjR_MoZxuz4S0BO3ZkPAeLoQ9rPxKHG=728eoQ@mail.gmail.com> <CAKFQuwZzkC3Z+sypWAaa6JUht5wKh7tjX-Kc2mRBSm8_1H-RCg@mail.gmail.com> <5614.1518831408@sss.pgh.pa.us> <CAD3a31Wki-VWezw6n6XYfc7gCTGmX3W+t22AzJc-vs4PHdMEsQ@mail.gmail.com> <20105.1518884772@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox