Re: [BUGS] numerics lose scale and precision in views of unions

From: mark(at)mark(dot)mielke(dot)cc
To: andrew(at)supernews(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [BUGS] numerics lose scale and precision in views of unions
Date: 2006-08-10 13:22:46
Message-ID: 20060810132246.GB15133@mark.mielke.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Thu, Aug 10, 2006 at 03:40:11AM -0000, Andrew - Supernews wrote:
> On 2006-08-10, Stephen Frost <sfrost(at)snowman(dot)net> wrote:
> >> Yeah, because numeric_cmp says that 1.0 and 1.00 are equal (what else
> >> could it say? "less" and "greater" are surely wrong). So you need to
> > It could say "not equal" pretty reasonably as the scale is
> > different.
> The comparison function must be trichotomous, that is the possible results
> are "equal", "greater", and "less". There is no other "not equal" result.

And it is wrong - because they are equal. But 1.0 is also equal to 1.01.
We shouldn't go there. :-)

Cheers,
mark

--
mark(at)mielke(dot)cc / markm(at)ncf(dot)ca / markm(at)nortel(dot)com __________________________
. . _ ._ . . .__ . . ._. .__ . . . .__ | Neighbourhood Coder
|\/| |_| |_| |/ |_ |\/| | |_ | |/ |_ |
| | | | | \ | \ |__ . | | .|. |__ |__ | \ |__ | Ottawa, Ontario, Canada

One ring to rule them all, one ring to find them, one ring to bring them all
and in the darkness bind them...

http://mark.mielke.cc/

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2006-08-10 13:38:10 Re: [BUGS] numerics lose scale and precision in views of unions
Previous Message mark 2006-08-10 13:20:09 Re: [BUGS] numerics lose scale and precision in views of unions

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-08-10 13:38:10 Re: [BUGS] numerics lose scale and precision in views of unions
Previous Message mark 2006-08-10 13:20:09 Re: [BUGS] numerics lose scale and precision in views of unions