Re: [BUGS] numerics lose scale and precision in views of unions - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: [BUGS] numerics lose scale and precision in views of unions
Date
Msg-id 20060810034449.GQ20016@kenobi.snowman.net
Whole thread Raw
In response to Re: [BUGS] numerics lose scale and precision in views of unions  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [BUGS] numerics lose scale and precision in views of unions
List pgsql-hackers
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> Stephen Frost <sfrost@snowman.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

pgsql-hackers by date:

Previous
From: Robert Treat
Date:
Subject: Re: 8.2 features status
Next
From: Mark Kirkwood
Date:
Subject: Re: 8.2 features status