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

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Brian C(dot) DeRocher" <brian(dot)derocher(at)mitretek(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [BUGS] numerics lose scale and precision in views of unions
Date: 2006-08-10 03:44:49
Message-ID: 20060810034449.GQ20016@kenobi.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

* Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> Stephen Frost <sfrost(at)snowman(dot)net> writes:
> > It could say "not equal" pretty reasonably as the scale is
> > different.
>
> Nope, there are exactly three options: equal, less, greater.
> btree doesn't understand anything else.

Ah, yeah, I can see how something else would cause some difficulties. :)

> There's certainly not anything in 8.2 contemplating the idea that two
> non-nulls could have any other comparison result than less, equal, or
> greater.

Makes me curious if it really makes sense to keep trailing zeros...
Having them there but not treating them any differently except for
display comes across as inconsistant to me.. Either 1.0 and 1.00 are
the same thing (and thus should be displayed the same way), or they
aren't (in which case they should be treated distinctly in, eg, a
'select distinct' clause).

Was there a particular motivation for the current way things are being
done? I seriously doubt anything I'd propose for the hash functions
would have any impact on it either way but it seems like it might be a
change worth considering in some future release (probably post-8.3).

Thanks,

Stephen

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2006-08-10 03:50:48 Re: BUG #2570: Connection closed unexpectedly
Previous Message Andrew - Supernews 2006-08-10 03:40:11 Re: [BUGS] numerics lose scale and precision in views of unions

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Kirkwood 2006-08-10 04:02:14 Re: 8.2 features status
Previous Message Robert Treat 2006-08-10 03:41:37 Re: 8.2 features status