Re: [HACKERS] Numeric overflow problem + patch

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: David Fetter <david(at)fetter(dot)org>
Cc: Martijn van Oosterhout <kleptog(at)svana(dot)org>, 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-03 21:25:58
Message-ID: 200610032125.k93LPwP07915@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


Patch applied. Thanks.

---------------------------------------------------------------------------

David Fetter wrote:
> 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, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match

--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2006-10-03 21:27:31 Re: scripts/common.c minor memory leak
Previous Message Martijn van Oosterhout 2006-10-03 21:18:47 scripts/common.c minor memory leak

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2006-10-03 21:27:31 Re: scripts/common.c minor memory leak
Previous Message Bruce Momjian 2006-10-03 21:21:35 Re: minor improvements in messages