Re: [HACKERS] Numeric overflow problem + patch

From: David Fetter <david(at)fetter(dot)org>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] Numeric overflow problem + patch
Date: 2006-10-02 00:46:02
Message-ID: 20061002004602.GA18936@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Thu, Sep 28, 2006 at 11:16:56PM +0200, Martijn van Oosterhout wrote:
> On Thu, Sep 28, 2006 at 05:11:43PM -0400, Tom Lane wrote:
> > David Fetter <david(at)fetter(dot)org> writes:
> > > ! DETAIL: A field with precision 4, scale 4 must have an absolute value less than 1.
> > > [ becomes ]
> > > ! DETAIL: A field with precision 4, scale 4 must have an absolute value less than 1 - 5 * 10^-5.
> >
> > This strikes me as overly pedantic. The message needs to be clear,
> > and the proposed change will just confuse people.
>
> I don't know if the code can detect the difference, but a message like:
>
> A field with precision 4, scale 4 must *round to* an absolute value less than 1
>
> Since that more accurately describes the actual problem.
>
> Have a ncie day,

Per your suggestion, how about this patch?

Cheers,
D
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
phone: +1 415 235 3778 AIM: dfetter666
Skype: davidfetter

Remember to vote!

Attachment Content-Type Size
correct_numeric_overflow_error.patch text/plain 3.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message ITAGAKI Takahiro 2006-10-02 01:52:48 Re: Another idea for dealing with cmin/cmax
Previous Message Andrew Dunstan 2006-10-02 00:23:00 Re: Win32 hard crash problem

Browse pgsql-patches by date

  From Date Subject
Next Message Brendan Jurd 2006-10-02 03:13:58 ISO week dates
Previous Message Euler Taveira de Oliveira 2006-10-01 17:54:57 minor improvements in messages